plot() format string

Use a format string (here, 'ro') to set the color and markers of a plot.

import matplotlib.pyplot as plt
plt.plot([1, 2, 3, 4], [1, 4, 9, 16], 'ro')
pyplot formatstr


The use of the following functions, methods, classes and modules is shown in this example:


<function Axes.plot at 0x7fcc163b1d30>

Keywords: matplotlib code example, codex, python plot, pyplot Gallery generated by Sphinx-Gallery