Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ax parameter of BasePVArray.plot_at_idx should be optional #142

Open
kandersolar opened this issue Apr 9, 2022 · 0 comments
Open

ax parameter of BasePVArray.plot_at_idx should be optional #142

kandersolar opened this issue Apr 9, 2022 · 0 comments

Comments

@kandersolar
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant