Closed rjleveque closed 7 years ago
Currently if you don't provide a setplot, you get a default setplot with some reasonable parameters. Will this break that?
(see code around line 1514 of frametools.py)
I only changed the definition of the setplot
functions already provided, to add a default value for the plotdata
argument,
def setplot(plotdata=None):
and if it's None
then a ClawPlotData
instance is created, and returned. But if you don't provide a setplot
function then this change is moot.
@ketch: Maybe I interpreted your question wrong, perhaps you were asking if the default setplot
or the way it is called needs to be changed?
The answer is no, since looking at line 1524 in frametools.py
, the default setplot
is called with a plotdata
argument that was instantiated earlier in this code, and this should still behave as always.
You're right! Thanks for making it clear to me. This seems like a nice improvement.
So you can do
rather than
which is handy when working in IPython or Jupyter if you want to change attributes of
plotdata
without modifyingsetplot.py
.I'll make the same change in other repositories.
I also cleaned up some inconsistencies in the headers and ugliness introduced by the Python 3 conversion.