So I have
import numpy as np
import matplotlib.pyplot as plt
plt.rc('text', usetex=True)
plt.rc('font', family='serif')
theta = np.linspace(0.000000000001,np.pi-0.000000000001,1024)
y = - 1 / ( ( theta - np.pi / 2 ) ** 4 - ( np.pi / 2 ) ** 4 )
y1 = y[:len(y)//2]
y2 = y[len(y)//2:]
theta1 = theta[:len(theta)//2]
theta2 = theta[len(theta)//2:]
plt.plot(theta1,y1,'r-')
#plt.plot(theta2,y2,'r-')
plt.xlabel(r'$\theta$')
plt.ylabel(r'$y$')
plt.yscale('log')
plt.xscale('log')
plt.show()
Changing to the other plot
#plt.plot(theta1,y1,'r-')
plt.plot(theta2,y2,'r-')
Now I want the second plot to look similar to the first one. That is, the $\theta$ axis has to get finer approaching Pi as it does in the first plot approaching 0. In the first one I simply could use the plt.xscale('log')
provided in matplotlib.pyplot. How would I do that for the second plot?