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

Range of values on the standard deviation axis do not adjust during overlay #33

Closed collinsowusu closed 2 years ago

collinsowusu commented 2 years ago

I am preparing a Taylor diagram by plotting my observed data first before running a loop to overlay results from other models.

The problem I have is that the vertical and horizontal axis (Standard deviation) do not adjust to include new data that are outside the range of the diagram. Find below an image of the problem I'm having. How do I fix this? image

ogunjosam commented 2 years ago

Dear @collinsowusu ,

I ran into a similar problem recently.

This was resolved by using a dynamic input in this form

axismax=np.ceil(np.max(sdev))

This uses the rounded up maximum value of the standard deviation to set the range of standard deviation.

Hope this helps.

PeterRochford commented 2 years ago

@collinsowusu

You can control the maximum and ticks of the standard deviation axes by using the tickSTD option. Refer to the STD Axis Options documentation. Refer also to Taylor example 3. You should be able to easily achieve what you desire after adjusting the list of tickSTD values.

collinsowusu commented 2 years ago

@PeterRochford and @ogunjosam

Thank you both for your prompt response. Both solutions work fine.