ax
parameter of BasePVArray.plot_at_idx should be optional
#8
Labels
enhancement
New feature or request
ax
parameter of BasePVArray.plot_at_idx should be optional
#8
Originally posted in SunPower/pvfactors#142:
It would be a minor convenience if
BasePVArray.plot_at_idx
could generate its own pyplot Axes object instead of forcing the user to pass one in. I don't mind keeping it as a required parameter in theplot_at_idx
methods of other classes, but sinceBasePVArray
is at the top of the tree and likely the one that people will be calling, it makes sense to me for it to be a special case.It's also convenient that
ax
is currently the last required parameter, so there's no need to reorder parameters, just tack=None
onto the parameter and do a quick check in the method body. However, since the method currently doesn't return anything, the user would have to useplt.gca()
or similar to access the plot object, so it might make sense to start returningax
at the end of the method too.The text was updated successfully, but these errors were encountered: