Verified Commit 6bb08950 authored by Toby Hodges's avatar Toby Hodges
Browse files

move subplots challenge

parent 8848224a
......@@ -609,6 +609,15 @@ plt.title(f"$X \\sim \\mathcal{N}(\\mu,\\,\\sigma^{2})$ - $\\mu$={mean}, $\\sigm
## Histograms
## Subplots
- the next exercise assumes an example of subplots arranged in a single row or column
> ## Rearranging Subplots
>
> Change the function definition above
> so that the subplots are organised in two rows,
> leaving the bottom-left corner empty.
{: .challenge}
## Others (link to docs)
# Axis
......@@ -913,20 +922,6 @@ https://matplotlib.org/tutorials/introductory/usage.html#the-builtin-backends
> {: .solution }
{: .challenge }
- before the next exercise:
~~~
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib import cm
gapminder = pd.read_csv('data/gapminder_all.csv', index_col='country')
~~~
{: .language-python }
- function from previous exercise also required
> ## Formatting Data Points
>
> 1. Fill in the blanks in the function definition below
......@@ -943,6 +938,8 @@ gapminder = pd.read_csv('data/gapminder_all.csv', index_col='country')
> to remind yourself of what is happening here.
>
> ~~~
> from matplotlib import cm
>
> continents = list(gapminder['continent'].unique())
> continent_colors = [cm.Set2.colors[continents.index(c)] for ___ in gapminder[___]]
>
......@@ -1031,15 +1028,6 @@ gapminder = pd.read_csv('data/gapminder_all.csv', index_col='country')
> {: .solution }
{: .challenge }
- the next exercise assumes an example of subplots arranged in a single row or column
> ## Rearranging Subplots
>
> Change the function definition above
> so that the subplots are organised in two rows,
> leaving the bottom-left corner empty.
{: .challenge}
> ## The coffee stain
>
> Accidents happen and hard lessons often come in a spiky package!
......
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