matplotlib/cheatsheets

Variable names should generally be lowercase

timhoffm opened this issue · 3 comments

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.

I use capital letters to indicate the variable is an array and I find this to be quite convenient. Since PEP-8 is a generic semantic-blind recommendation and I would prefer not to enforce it too strictly.

I use capital letters to indicate the variable is an array

Numpy and matplotlib docs generally don't do this. Changing naming conventions (whether better or not) may be confusing.

I think PEP-8 is confusing in that specific case. But ok to change names if really necessary.