Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions _episodes/08-putting-it-all-together.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,12 +292,11 @@ plt.show() # not necessary in Jupyter Notebooks
> > fig, ax = plt.subplots()
> > flood = discharge[(discharge["datetime"] >= "2013-09-11") &
(discharge["datetime"] < "2013-09-15")]
>>
> >
> > ax2 = fig.add_axes([0.65, 0.575, 0.25, 0.3])
>> flood.plot(x ="datetime", y="flow_rate", ax=ax)
> > flood.plot(x ="datetime", y="flow_rate", ax=ax)
> > discharge.plot(x ="datetime", y="flow_rate", ax=ax2)
> > ax2.legend().set_visible(False)

> > ax.set_xlabel("") # no label
> > ax.set_ylabel("Discharge, cubic feet per second")
> > ax.legend().set_visible(False)
Expand All @@ -318,12 +317,11 @@ fig.savefig("my_plot_name.png")
~~~
{: .language-python}

Which will save the `fig` created using Pandas/matplotlib as a png file with the name `my_plot_name`
which will save the `fig` created using Pandas/matplotlib as a png file with the name `my_plot_name`

> ~~~
> Matplotlib recognizes the extension used in the filename and
> supports (on most computers) png, pdf, ps, eps and svg formats.
> ~~~
> ## Tip: Saving figures in different formats
> Matplotlib recognizes the extension used in the filename and
> supports (on most computers) png, pdf, ps, eps and svg formats.
{: .callout}

> ## Challenge - Saving figure to file
Expand Down Expand Up @@ -357,4 +355,3 @@ save as a text file with a `.py` extension and run in the command line).
{: .challenge}

{% include links.md %}