Plots of functions on 1D meshes now takes yrange into account

Merged
#366 · Created  · Last updated

Merged pull request

Merge branch 'master' into karl0erik/fix-matplotlib-limits

f25b731·Author: ·Closed by: ·2017-07-07

Description

If you try to plot something like Expression("10*x[0]") on a UnitIntervalMesh in a Jupyter notebook, you will see that the graph just vanishes off screen. This is because the ymin/ymax is not properly set, as calling ax.set_ylim([None, None]) has the maybe non-intuitive effect of fixing the default y-limits so that a later call to ax.plot() won't update them. Moving the call to ax.plot() before the call to ax.set_ylim() fixes this with no adverse effects.

0 attachments

0 comments

Loading commits...