Open terrorfisch opened 5 years ago
Using %matplotlib inline
has the minor drawback that the resulting plot cannot be interactively explored with the move and zoom UI offered by %matplotlib notebook
.
Another, potentially bigger, issue is that our plot
function by default sets its show
argument to True
and thus issues a call to figure.show()
which results in a warning when used in the %matplotlib inline
context. This call to figure.show()
is not necessary within a notebook as the figure will be displayed anyways. Suppressing is thus prevents the warning. It does, however, require us to either explicitely put show=False
in each call to plot
in our examples - which would be confusing since the plot is shown - or set show
to False
by default, which would require every use of plot
outside of notebooks to explicitely pass show=True
(or call the show()
method on the returned figure object). Both of these do not really seem favorable to me.
-- lumip
We can validate the output https://github.com/computationalmodelling/nbval
Some other tools that might be useful:
%matplotlib inline
which includes a png instead of a javascript object