Version 3.1.2
matplotlib

Table of Contents

Related Topics

Pyplot Three

Plot three line plots in a single call to plot.

============
Pyplot Three
============

Plot three line plots in a single call to `~matplotlib.pyplot.plot`.
"""
import numpy as np
import matplotlib.pyplot as plt

# evenly sampled time at 200ms intervals
t = np.arange(0., 5., 0.2)

# red dashes, blue squares and green triangles
plt.plot(t, t, 'r--', t, t**2, 'bs', t, t**3, 'g^')
plt.show()
Traceback (most recent call last):
  File "/build/matplotlib-tq5J6U/matplotlib-3.1.2/examples/pyplots/pyplot_three.py", line 1
    ============
    ^
SyntaxError: invalid syntax

References

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

import matplotlib
matplotlib.pyplot.plot
matplotlib.axes.Axes.plot

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