Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Bio-IT Workshops
Intermediate Python
Commits
6bb08950
Verified
Commit
6bb08950
authored
Jul 20, 2020
by
Toby Hodges
Browse files
move subplots challenge
parent
8848224a
Changes
1
Show whitespace changes
Inline
Side-by-side
_episodes/03-plotting.md
View file @
6bb08950
...
...
@@ -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!
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment