Plasmapy: Sensible plot defaults

Created on 9 Dec 2017  路  6Comments  路  Source: PlasmaPy/PlasmaPy

It would be useful to have some sensible plot defaults based on matplotlib to visually unify any examples we generate in the documentation.

These could also be used for generating publication quality plots (like for #159 ) and sort through some of the hiccups in matplotlib (e.g. unifying LaTeX rendered fonts with regularly rendered fonts, line plots with shaded regions representing errors, etc.).

Accessibility medium Visualization

Most helpful comment

For the plot defaults, we should keep in mind accessibility issues like color-blindness. I would lean towards more pastel colors and textured lines, and avoid red-green and blue-purple combinations. The latest major version of matplotlib has already established improved defaults in this regard.

All 6 comments

For the plot defaults, we should keep in mind accessibility issues like color-blindness. I would lean towards more pastel colors and textured lines, and avoid red-green and blue-purple combinations. The latest major version of matplotlib has already established improved defaults in this regard.

@lemmatum I think based on the discussion on matrix, I agree that we should add a custom matplotlibrc file. Maybe we could start with your file as a starting point? I could help with this.

@tulasinandan So this depends on what approach we would like to take. In my scripts I don't use a matplotlibrc file, rather I use a python script that I import as a module and that dynamically sets up all the necessary rcParams. Here is a page which discusses both techniques.

Thoughts?

I would say the second way would be best for PlasmaPy. We could include a plasmaplotdefaults file and import it in our plotting methods.

Alright, I'll make a PR with my plot defaults file once I finish conference stuff this week.

Great!

Was this page helpful?
0 / 5 - 0 ratings