First page Back Continue Last page Overview Graphics

Format String of plot

There is another optional argument

which is the format string.

It indicates the color and line type

of the plot.

The letters and symbols of the

format string are from MATLAB

The default format string is ‘b-‘,

which is a solid blue line.

For example, to plot the previous

example with red circles, you would write

plt.plot([1,2,3,4], [1,4,9,16], "r1")