Skip to content

Upgrade minimal version of matplotlib to 1.5.3 and use a seaborn-like style in docs #17423

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

Closed
topper-123 opened this issue Sep 2, 2017 · 8 comments
Labels
Milestone

Comments

@topper-123
Copy link
Contributor

topper-123 commented Sep 2, 2017

Matplotlib is an optional dependency of pandas. I propose making matplotlib 1.5.3 the recommended minimal version for pandas 0.21. Currently, v1.4.3 is the minimal version.

The reason are:

  • matplotlib v1.4 has support for python up to 3.4. it doesnt officially support python 3.5 or above. it's old.
  • matplotlib 1.5 has support for python up to 3.5. it doesnt officially support python 3.6, but this is still better than for 1.4.
  • matplotlib 1.5 has some new built-in styles, among others seaborn-like styles. IMO the ggplot-based plot that are used in the docs at present have a bit of 90-feel, while (IMO, this is subjective) the seaborn styles have a more modern feel. By upgrading the minimum version to 1.5 we could make the plots in the docs switch style to seaborn-style.
  • also, matplotlib 1.5 has built-in support for labeled data (a la pandas' column names). This upgraded requirement, while it may not affect users of pandas directly, could allow some refactoring of the plotting code in pandas (disclaimer, I haven't looked at the pandas plotting code).

For differences between the different 1.x versions for matplotlib, see her.

So:

  • do people support making matplotlib 1.5 the minimum recomemnded version for pandas 0.21?
  • Do people support switching the plot style in docs to a seaborn style?
@topper-123
Copy link
Contributor Author

Alternatively, if going to 1.5 is seen as too big of a change this time, could the doc plots still be built using matplotlib => 1.5 and making a note on how they're made.

@jreback
Copy link
Contributor

jreback commented Sep 5, 2017

going to 1.5.3 is fine. we don't support python 3.4.

@jreback
Copy link
Contributor

jreback commented Sep 5, 2017

note that this issue is 2 independent parts. The docs are built on 3.6 with specific requirements and can/should use the newest mpl syntax (we use the latest mpl), see requirements-3.6_DOC.build.

@topper-123
Copy link
Contributor Author

Ok. I'll make a pull request where the style for the doc plots will have a seaborn style.

I'll assume that I only have to change the .rst files and the plots will be generated automatically (i.e. I don't have to generate each one and put them in a folder somewhere)?

@TomAugspurger
Copy link
Contributor

@topper-123 seach for matplotlib.style.use('ggplot') in the rst files. And yes, the plots are generated automatically.

FWIW, I prefer the default matplotlib 2.0 style for some things like line plots. I might vote for it over 'seaborn', but would be curious what others prefer.

@topper-123
Copy link
Contributor Author

topper-123 commented Sep 5, 2017

Thanks @TomAugspurger. Then it's very easy, that's nice. I'll might wait a few days before commiting, if a discussion arises.

I personally prefer seaborn-deep, but would go with seaborn here, as that's more standard choice. I would like to keep the style consistent for the whole docs (unless there's a specific reason not to).

I could maybe add a small snippet, showing 2-3 different styles, so readers who are unfamiliar with matplotlib can get a feel for the possibilities).

@TomAugspurger
Copy link
Contributor

TomAugspurger commented Sep 6, 2017 via email

@topper-123
Copy link
Contributor Author

This issue was done in #17462, so i'm closing the issue.

@jorisvandenbossche jorisvandenbossche added this to the 0.21.0 milestone Nov 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants