matplotlib / matplotlib/cheatsheets

Variable names should generally be lowercase

Open
#65 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
7.7k
Forks
916
PR merge metrics
No merged PRs in 30d

Description

In many places we have uppercase variables, e.g.
```
X = np.linspace(0, 2 * np.pi, 100)
Y = np.sin(X)
```
and likewise then in the plot functions.

This is against PEP-8 naming conventions and IMHO sets a bad example. At least 1D arrays should be lowercase. One may debate on 2D arrays, which have a history of using uppercase letters in the Matplotlib docs.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Search the cheatsheets for examples using uppercase variables such as X and Y, including the related plot functions. Review the surrounding Matplotlib examples and the PEP-8 naming guidance, then update the 1D array names while deciding whether the documented 2D-array convention should remain; done means the affected examples consistently reflect the chosen convention.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.