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

Potential pull request: plotting Taylor diagrams as subplots #27

Closed adlzanchetta closed 2 years ago

adlzanchetta commented 2 years ago

Congratulations for this amazing package @PeterRochford !

I've been using it for a time, but recently I found some apparent limitations that did not allowed me to get to the result I wanted:

  1. I was not able to have multiple Taylor plots in a single Figure;
  2. The curved "correlation coefficient" label sometimes have overlapping letters depending on the font used, maybe a linear option could be available;
  3. There was not a clear way to set the colors of the x and y (left/bottom) frames.

So I added some functions to the package that allow me to overcome these issues in a way that does not affect the current implementation. I also added an example to illustrate how to use the new functions that produces the following figure: taylor14

If you believe this is a good add to the project, I would be more than happy to properly document it following the commenting standards of the project and submit a pull request. Please let me know your thoughts and thanks for sharing your code!

PeterRochford commented 2 years ago

Andre,

Thank you for taking the time to improve the SkillMetrics package. Yes, I would like to add these features to the package. Please properly document the code and submit a pull request. I will review and make minor changes as needed for consistency. Please be sure to state your authorship in the Python functions and example script to ensure due credit.

Note that I have kept the package limited to just producing a single diagram with the view that users can figure out how to create multiple diagrams in a single figure according to their needs and desires. However, I’m sure posting an example of how to do this on the Wiki would be welcomed by the user community.

If you provide a working example of your multiple diagram figure with the pull request I’ll investigate how to individually set the colors in the diagrams.

Regards, Peter

On Aug 12, 2022, at 10:39 AM, Andre Della Libera Zanchetta @.***> wrote:

Congratulations for this amazing package @PeterRochford https://github.com/PeterRochford !

I've been using it for a time, but recently I found some apparent limitations that did not allowed me to get to the result I wanted:

I was not able to have multiple Taylor plots in a single Figure; The curved "correlation coefficient" label sometimes have overlapping letters depending on the font used, maybe a linear option could be available; There was not a clear way to set the colors of the x and y (left/bottom) frames. So I added some functions to the package that allow me to overcome these issues in a way that does not affect the current implementation. I also added an example https://github.com/adlzanchetta/SkillMetrics/blob/master/Examples/taylor14.py to illustrate how to use the new functions that produces the following figure: https://user-images.githubusercontent.com/8687998/184375060-15743b08-d8c6-4991-b64e-016153f1ce02.svg If you believe this is a good add to the project, I would be more than happy to properly document it following the commenting standards of the project and submit a pull request. Please let me know your thoughts and thanks for sharing your code!

— Reply to this email directly, view it on GitHub https://github.com/PeterRochford/SkillMetrics/issues/27, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF3YS7BGEQ7X4XF65CWSGC3VYZOY7ANCNFSM56L4X5LA. You are receiving this because you were mentioned.

adlzanchetta commented 2 years ago

Dr. Rochford,

I've submitted the pull request #28 in which both the subplot and the color issues are tackled. A few additional notes to the comments in the own pull request:

Thanks, Andre.

PeterRochford commented 2 years ago

This capability has now been implemented in SkillMetrics 1.2.1.