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

gpos pos positional count begins at 1 when should be Pythonic 0 #76

Open
sadielbartholomew opened this issue Oct 3, 2024 · 0 comments
Assignees

Comments

@sadielbartholomew
Copy link
Member

The gpos function requires an integer argument pos to define the plot position. The first position is encoded by the value 1, but this is very un-Pythonic, since 0 which encodes the first position for mots of not all Python objects. In practice, this can making programmatic usage awkward, for example when iterating over something to assign sub-plots, a value i + 1 needs to be used instead of simply i, which would be much cleaner and understandable to those reading the code:

for i, proj in enumerate(<variable to change across subplots>):
    cfp.gpos(i + 1)
    <generate sub-plot with given variable choice>

So, we should set the position pos to being at 0 and count from there, not from 1. The pos argument could also be documented much more clearly, so this should be done when this change is made.

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

No branches or pull requests

1 participant