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 the plot_at_idx methods of other classes, but since BasePVArray 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 use plt.gca() or similar to access the plot object, so it might make sense to start returning ax at the end of the method too.
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.