

#Matlab line style how to
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: Ci sono quattro stili di linea disponibili in MATLAB: linea continua, linea tratteggiata, linea tratteggiata e linea tratteggiata. Create Line Plot with Markers Add markers to a line plot to distinguish multiple lines or to highlight particular data points. This is useful if you want to specific a color that is not in the list by using RGB values. Line style in Matlab controls all the properties in the Line plot which is used to modify the look and feel of the line graph. Create 2-D Line Plot Create a 2-D line plot and specify the line style, line color, and marker type. LineSpec is an argument to plotting functions, such as plot, that defines three components used to specify lines in MATLAB: Line style Color Marker. 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: Specify these symbols (in any order) as a quoted string after the data arguments. The following tables list the symbols you use to define the line style, color, and marker. If you specify a marker, but no a linesytle, MATLAB plots only the markers. MATLAB defines string specifiers for line. ), colored red ( r), and places circular markers ( o) at the data points. Line style Line width Color Marker type Marker size Marker face and edge coloring (for filled markers). Plots y versus x using a dash-dot line (.

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:
