Matplotlib: Difference between revisions

== Project steps ==
=== 1. Create a basic plot ===
<pre>x_values = [30, 4, 7, 20, 22, 25]
y_values = [0, 2, 4, 8, 16, 32]
pyplot.plot(x_values, y_values, "o-")</pre>
Note how matplotlib automatically resizes the graph to fit all of the points in the figure for you.
Read about how to generate random integers on
Then, instead of hard-coding x values and y values in <code></code>, generate a list of random y values.
An example plot using random y values might look like this:
=== 2. Plotting the world population over time ===
Anonymous user