Skip to content

Commit 2e01d09

Browse files
committed
07-visualization-ggplot-python.md: fix formatting of two solutions
1 parent ac29be2 commit 2e01d09

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

_episodes/07-visualization-ggplot-python.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -477,12 +477,10 @@ survey_2000 = surveys_complete[surveys_complete["year"].isin([2000, 2001])]
477477
> weight of the species changes through the years.
478478
>
479479
> > ## Answers
480-
> > yearly_weight = surveys_complete.groupby(['year', 'species_id'])['weight'].mean().reset_index()
481480
> >
482481
> > ~~~
483-
> > (p9.ggplot(data=yearly_weight,
484-
> > mapping=p9.aes(x='year',
485-
> > y='weight'))
482+
> > yearly_weight = surveys_complete.groupby(['year', 'species_id'])['weight'].mean().reset_index()
483+
> > (p9.ggplot(data=yearly_weight, mapping=p9.aes(x='year', y='weight'))
486484
> > + p9.geom_line()
487485
> > + p9.facet_wrap("species_id")
488486
> > )
@@ -498,6 +496,8 @@ survey_2000 = surveys_complete[surveys_complete["year"].isin([2000, 2001])]
498496
> an individual color assigned to each `species_id`.
499497
>
500498
> > ## Answers
499+
> >
500+
> > ~~~
501501
> > yearly_weight = surveys_complete.groupby(['year', 'species_id', 'sex'])['weight'].mean().reset_index()
502502
> >
503503
> > (p9.ggplot(data=yearly_weight,
@@ -507,6 +507,7 @@ survey_2000 = surveys_complete[surveys_complete["year"].isin([2000, 2001])]
507507
> > + p9.geom_line()
508508
> > + p9.facet_wrap("sex")
509509
> > )
510+
> > ~~~
510511
> > {: .language-python}
511512
> {: .solution}
512513
{: .challenge}

0 commit comments

Comments
 (0)