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') Related SolutionsMATLAB: How to replace x or y axis tick values with texts x=[1,3,4,6]; y=[20,40,50,80]; plot(x,y);yticks([20,40,60,80])yticklabels({'white', '\color{red}red', '\color{green}green', 'yellow'}); set(gca,'TickLabelInterpreter', 'tex')ycat = categorical(y, [20 40 50 80], {'white', 'red', 'green', 'yellow'})ycat = 1×4 categorical array white red green yellow plot(x, ycat) MATLAB: How to change color of x and y axis by red and blue set(gca,'xcolor','r','ycolor','b') Related QuestionWhen ploting the left y axis always be the bule I can not change the colorSurface Plot is BlackIs it possible draw left y-axis with red color and the right y-axis with blue colorPlot colour using GUIDEChange axis colour to a user-define color
Best Answer