How can I change the grey color in the background to white color?
mydata.plot()
Advertisement
Answer
import matplotlib.pyplot as plt import numpy as np x = np.arange(0, 10, .1) y = np.sin(x) plt.figure(facecolor='yellow') plt.plot(x, y) plt.xlabel("X") ax = plt.axes() ax.set_facecolor("violet") plt.ylabel('sin(x)') plt.show()
it make it yellow my freind