display of plotting output in tutorial notebooks is inconsistent

Issue #57 closed
Thomas Gilgenast created an issue

in the tutorial notebooks, we sometimes want to demonstrate the use of the outfile kwarg to write plot output to a file (showing it later using IPython.display.Image), while at other times we want to show the plot inline with %matplotlib inline

we currently use %matplotlib notebook to try to hide the plots that we are writing to file from being displayed inline in the notebook

this works on colab, but in a normal jupyter environment it shows the large interactive plotting UI (one per rep if parallelized) with no content (since the content is in a different figure that has been saved to disk by now)

we consider three possible solutions to hiding the plot output for these cells:

  1. %matplotlib agg: this does exactly what we want but it was only added in IPython 6.0 which only supports Python 3, see this issue
  2. plt.close(): this hides the UI but leaves behind a giant rectangle that is tricky to collapse programmatically, see this issue
  3. %%capture: this feels like an indirect way of solving the problem but it works on colab and in jupyter, see this SO answer

Comments (2)

  1. Thomas Gilgenast reporter

    wip on notebook building

    closes #57

    added gmean_20_8 binning to default pipeline config so we can use it in the tutorial

    temporarily changed tutorials/run.py to run only the scripting tutorial for testing purposes

    first stab at tutorial build pipeline in bibucket

    → <<cset 93e277d38bf8>>

  2. Log in to comment