Skip to content

Out of context and misleading instruction for saving figures #35

Open
@hlapp

Description

@hlapp

The lesson states the following in section Saving your plots as image files:

If you'd like to save your plots as an image file, you can run fig.savefig('my_figure.png') where "my_figure" is the file name.

This won't work, and it's non-trivial to recover to a way that it does:

  1. There is no variable fig here. Normally (in matplotlib documentation commonly found) this is the return value of plt.figure(), but we are not using this method here. Instead we use Seaborn.boxplot(), which does not return an equivalent value.
  2. plt.savefig() would work (as one can find out from testing autocompletion alternatives), but appears to have to be in the same code cell as the one generating the plot. I.e., we can't just insert a new cell here and run this method.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions