PeterRochford / SkillMetrics

A Python library for calculating and displaying the skill of model predictions against observations.
GNU General Public License v3.0
201 stars 92 forks source link

for multiple cases, not only marker shape, but also color, are different #23

Closed tamitoto closed 2 years ago

tamitoto commented 3 years ago

I wanted to plot multiple cases on the Taylor Diagram, but I needed the markers to be not only different shapes, but also different colors.

So, I basically made 4 changes:

  1. Added one more color, gray, to the default colors and accordingly increased the max case size to 80.
  2. Switched the blue and red colors in the default color array, colorm, so that if a color other than red is sent with the markercolor option, then it will be used.
  3. If the number of cases is <= the default number of markers, then each case gets a different marker shape and color (instead of only the default color of red or the one color that can be passed in with the markercolor option).
  4. Made the marker edge color match the color of the marker

I've included here the result from the taylor5.py example.

taylor5_example

PeterRochford commented 2 years ago

Thank you for your contribution. It makes for a prettier diagram. I've now merged it into the master branch.