`gpos` `pos` positional count begins at 1 when should be Pythonic 0
@sadielbartholomew is already working on this.
Since Oct 3, 2024.
- Dominant language
- Python
- Stars
- 21
- Forks
- 11
- Avg merge
- 7h 11m
- Merged PRs (30d)
- 1
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.