[TOC]

plot

Plotting data (2D plot)

Usages

plot(y)

plot(y,spec)

plot(y,name1,value1,...,nameN,valueN)

plot(y,spec,name1,value1,...,nameN,valueN)

plot(x,y)

plot(x,y,spec)

plot(x,y,name1,value1,...,nameN,valueN)

plot(x,y,spec,name1,value1,...,nameN,valueN)

plot(x1,y1,spec1,...,xM,yM,specM,name1,value1,...,nameN,valueN)

Line Specification String

Attribute Names and Values

The following show the attribute names and their associated values.

LineStyle

ValueDescription
'-'Solid line
'--'Dashed line
'-.'Dash-dotted line
':'Dotted line
'none'No line

The default line style is 'none' if the marker is specified. If no marker is specified, the default line style is '-'.

'Color'

ValueDescription
'b', 'blue'Blue
'r', 'red'Red
'm', 'magenta'Magenta
'g', 'green'Green
'c', 'cyan'Cyan
'y', 'yellow'Yellow
'k', 'black'Black
'w', 'white'White
[r, g, b]RGB vector, where

If the line color is not specified, it is assigned to blue, red, orange, purple, magenta, green, cyan or yellow in a cyclic manner. More precisely, the -th color in this list is used in the -th line, where is the total number of colors. For example, the 10-th line has red color. [r,g,b] cannot be used in a specification string.

'Marker'

ValueDescription
'o'Circle
'+'Plus
'*'Asterisk
'.'Point
's', 'square'Square
'd', 'diamond'Diamond
'x'Cross
'^'Up triangle
'v'Down triangle
'<'Left triangle
'>'Right triangle
'p', 'pentagram'Pentagram
'h', 'hexagram'Hexagram
'none'No marker

MarkerEdgeColor

The values are the same as those for Color above.

MarkerEdgeColor

The values are the same as those for Color above.

MarkerSize

It should be a positive number. The default size is 6.0

DisplayName

It is the name shown in the legend. It should be given as a character vector. The default value is "Line".