Algoteka
Log in to submit your own samples!

Plot a Line Graph

Problem by oml1111
# Tech tags Title Creator Created date
1 0
Matplotlib
2022-08-13 00:10
2 0
Plotly
2022-12-15 21:37
3 0
Bokeh
2022-12-15 21:12
View all samples for this language (3 verified and 0 unverified)

Simple solution | Python | Matplotlib |

By oml1111 |
0 likes

Renders the following line graph:
Line graph

Code

import matplotlib.pyplot as plt

plt.plot([1, 2, 3, 5], [2, 5, 4, 6])
plt.show()

Further reading

Pyplot tutorial - matplotlib.org

References

functions
matplotlib.pyplot.plot matplotlib.org
matplotlib.pyplot.show matplotlib.org

Problem Description

Render a line graph. Include a picture of the line graph in the specification.

View sample discussion (0 comments)
View problem discussion (0 comments)