MATLAB: How to make a plot background black

backgroundbackground colorblack backgroundplotplotting

I have two vectors.
x=[1 2 3 4 5];
y=[10 20 30 40 50];
I plotted the vectors
plot(x,y)
The default background of the plot is white. How do I change the plot background to black?

Best Answer

This works:
plot(x,y)
set(gca,'Color','k')