clawpack / visclaw

Clawpack visualization tools
http://www.clawpack.org
BSD 3-Clause "New" or "Revised" License
29 stars 48 forks source link

plotaxes with same name results in missing plots #209

Open Dirivian opened 7 years ago

Dirivian commented 7 years ago

When we create a plotaxes object, we need to give it a name ('Density' in the line below):

plotaxes = plotfigure.new_plotaxes(name='Density')

Using the same name again for another plotaxes object results in the first one disappearing (i.e., the plot doesn't show up). It would be nice if visclaw gave a warning in this case.

mandli commented 7 years ago

What kind of warning are you thinking? I could see simply printing out a warning message to the terminal or actually raising an exception. I am slightly more in favor of doing the latter as you could replace a plotaxes by first removing it and then adding the new one.

rjleveque commented 7 years ago

If you make a new ClawPlotFigure with the same name as a previous one I think it does throw an error. We should do something similar with ClawPlotAxes.