Make browser plotting user-friendly
Issue #797
new
Plotting in the browser requires import stuff and setting obscure parameters, for example:
# pre stuff
import matplotlib
matplotlib.use('webagg')
import matplotlib.pyplot as plt
parameters['plotting_backend'] = 'matplotlib'
# plotting
plot(v)
# post stuff
plt.show()
Put the pre stuff into the plot command (we can easily check that we do it only once).
Put the post stuff into a new function dolfin.show()
. This function can instruct users how to view the plot (visit the following URL in your browser, or even fire up a new browser tab).
The current interactive()
command can remain for some time with a deprecation warning and call dolfin.show()
.
Comments (4)
-
-
reporter Our Docker containers could set some environment flag, like
DOLFIN_USE_AGG
or similar. -
This report is conflating Matplotlib plotting and browser-based plotting. One step at a time.
-
- removed milestone
- Log in to comment
You don't want to use webagg when in a regular notebook. Not sure how easy it is to auto-configure this.