Object's order of creation, starting at 1. SeriesIndex property is a number that corresponds to the So you can use 1/255255,0,0 to get the color of red to use as a color in MATLAB. LineStyleOrder arrays, the colors, line styles, and markersįor a particular plot object are determined by the value of the object's SeriesIndex, which In the past, each new plot command would start with the first color. If there are more objects thanĬombinations of colors and character sequences, then the cycle repeats. TheĬycle continues for each new plot object. The LineStyleOrder array before the next sequence is used. LineStyleOrder array contains only the solid line style,ĬolorOrder array are used with one character sequence in Line style (or a line style combined with a marker). x 0:pi/100:2pi y1 sin (x) y2 sin (x-0.25) 圓 sin (x-0.5) figure plot (x,y1,x,y2, '-' ,x,圓, ':') MATLAB cycles the line color through the default color order. Specify a dashed line style for the second line and a dotted line style for the third line. The LineStyleOrder property contains aĬell array of character sequences, where each character sequence corresponds to a Use the default line style for the first line. If the plot objects support line styles and markers, MATLAB also cycles through the list in the LineStyleOrder Objects than there are colors, the colors repeat. The defaultĬolorOrder array contains seven colors. Triplets, where each RGB triplet defines a color. The ColorOrder property contains an array of RGB Through the colors listed in the ColorOrder property The objects returned by these functions typically have properties for controlling the color. The default ColorOrder array contains seven colors. The ColorOrder property contains an array of RGB triplets, where each RGB triplet defines a color. Many plotting functions have an input argument such as c or colorspec for customizing the color. MATLAB assigns colors to plot objects (such as Line, Scatter, and Bar objects) by cycling through the colors listed in the ColorOrder property of the axes. You can customize the colors if you need to. The default colors provide a clean and consistent look across the different plots you create. MATLAB assigns colors to plot objects (such as Line, MATLAB creates plots using a default set of colors. Plot colors and line styles in an earlier release, see Why Are Plot Lines Different Colors? and Line Styles Used for Plotting - LineStyleOrder. R2019b, and some of the functionality is available starting in R2020a. Some of the functionality in the following examples is available starting in