MATLAB: How to shading plot colorplotshadeshadedshading Best Answer Color is defined as a vector of 3 values: RGB. When you select 'g' on you plots this vector is [0 1 0]. 'r' is [1 0 0] or 'b' is [0 1 0]. You can customize the color for every curve:mycolor = [0 1 0];h = plot(x,y);set(h,'Color', mycolor);To know which is the values of the greens, you can look at this page, for example: http://www.rapidtables.com/web/color/RGB_Color.htm Related SolutionsMATLAB: Is the autocolor green of plot not the same as plotting ‘g’ I have no idea why, but you can set the colour manually:plot(x,y,'color',[0 0.5 0])or, for that matter, use any 1x3 vector to set the RGB colours. Type get(gcf,'DefaultAxesColorOrder')to see the default colour scheme MATLAB: Is the shade of green different when plotting a line with PLOT(X,Y,’g’) than the shade of green used when cycling through the colors in the default color order The RGB value for the shade of green used with the commandplot(x,y,'g')is [0 1 0].The shade of green used in the default ColorOrder property of the axes is [0 0.5 0].The documentation has been amended in MATLAB 7.9 (R2009b) to clarify this difference. Related QuestionSetting colors for plot functionHow to change colour in waterfall plotHow to fill gridsHow to translate RGB color to a color on the patch Object
Best Answer