See Also line, plot, surface, patch, Axes LineStyleOrder propert. See the ColorSpec for more information on color.Įxamples Plot the sine function over three different ranges using different line styles, colors, and markers:Ĭreate a plot illustrating how to set line graphics properties: This is useful if you want to specific a color that is not in the list by using RGB values. In addition, you can specify the LineStyle, Color, and Marker properties instead of using the symbol string. MarkerSize - specifies the size of the marker in points.MarkerFaceColor - specifies the color of the face of filled markers.MarkerEdgeColor - specifies the color of the marker or the edge color forfilled markers (circle, square, diamond, pentagram, hexagram, and the four triangles).LineWidth - specifies the width (in points) of the line.Related Properties When using the plot and plot3 functions, you can also specify other characteristics of lines using graphics properties: Many plotting functions have an input argument called linespec for customizing. If you want, you can customize these aspects of your plot. These defaults provide a clean and consistent look across the different plots you create. Specify these symbols (in any order) as a quoted string after the data arguments. This example shows how to customize the map axes by changing the tick label format, the geographic limits, the appearance of the graticule line, and the colors of fonts. MATLAB creates plots using a default set of line styles, colors, and markers. The following tables list the symbols you use to define the line style, color, and marker. MATLAB cycles the line color through the default color order. If you specify a marker, but no a linesytle, MATLAB plots only the markers. This MATLAB function creates a 2-D line plot of the data in Y versus the corresponding. ), colored red ( r), and places circular markers ( o) at the data points. Plots y versus x using a dash-dot line (. Running this code again in MATLAB R2015a, this is what I get:Īlternatively, you can always use a legend that delineates what histogram comes from which data.LineSpec (MATLAB Function Reference) MATLAB Function Referenceĭescription LineSpec is an argument to plotting functions, such as plot, that defines three components used to specify lines in MATLAB: colours = permute(get(gca, 'colororder'), ) Ĭolours_resize = imresize(colours, 50.0, 'nearest') Assuming you have the image processing toolbox, this is the code I wrote to visualize those colours for each plot you place in your figure. The RGB tuples in this case are slightly more complex and so it's hard to infer what they are by just looking at the colours.Īs an additional bonus, we can create an image that visualizes these colours for you.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |