Commit 77128ea8 authored by Azalee Bostroem's avatar Azalee Bostroem Committed by Trevor Bekolay
Browse files

added more description to the introduction of subplots

parent 3bd6c9cf
......@@ -600,6 +600,15 @@ so either there's a mistake in our calculations
or something is wrong with our data.
You can groups similar plots in a single figure using subplots.
This script below uses a number of new commands. The function `matplotlib.pyplot.figure()`
creates the a space into which we will place all of our plots. The parameter `figsize`
tells Python how big to make this space. Each subplot is placed into the figure using
the `subplot` command. The `subplot` command takes 3 parameters. The first denotes
how many total rows of subplots there are, the second parameter refers to the
total number of subplot columns, and the final parameters denotes which subplot
your variable is referencing. Each subplot is stored in a different variable (axes1, axes2,
axes3). Once a subplot is created, the axes are can be titled using the
`set_xlabel()` command (or `set_ylabel()`).
Here are our three plots side by side:
~~~ {.python}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment