visclaw icon indicating copy to clipboard operation
visclaw copied to clipboard

plotaxes with same name results in missing plots

Open Dirivian opened this issue 7 years ago • 2 comments

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.

Dirivian avatar Mar 07 '17 19:03 Dirivian

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.

mandli avatar Mar 07 '17 23:03 mandli

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.

rjleveque avatar Mar 08 '17 00:03 rjleveque