Change plot background color in jupyter notebook

Question:

How can I change the grey color in the background to white color?

mydata.plot()

plot

Asked By: Merahamad

||

Answers:

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

Answered By: AliAlavi
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.