I am using matplotlib
in Spyder
for a simple plotting of sine and cosine. When i run this code
import matplotlib.pyplot as plt
import numpy as np
x1 = np.arange(0,4*np.pi,0.1) # start,stop,step
y1 = np.sin(x1)
z1 = np.cos(x1)
plt.plot(x1,y1, z1)
plt.show()
I get this plot.
I didn't like the default plotting colors I am getting as you see in my plot above. However, I wanted to change them with good looking colors. I tried it with plt.style.use('classic')
as the following
import matplotlib.pyplot as plt
import numpy as np
plt.style.use('classic')
x1 = np.arange(0,4*np.pi,0.1) # start,stop,step
y1 = np.sin(x1)
z1 = np.cos(x1)
plt.plot(x1,y1, z1)
plt.show()
But this again seems to add grayed background outside of the wall as you can see it and besides it seems to shrink the space of the plot lines to touch the X axis and this seems to be a bit odd.
Is there any elegant way of doing this in matplotlib
without the grayed background outside the plot and without shrinking the space?