Skip to content
Peter Rochford edited this page Oct 12, 2021 · 10 revisions

Frequently Asked Questions

Q1. In the rare case where two model predictions compared against observations fall on the same point, is there a way for the two symbols to be seen on the target and Taylor diagrams?

A1. You can control the face color of the marker symbols using the alpha option to change the blending of symbol face color (0.0 transparent through 1.0 opaque). Try setting the face color to transparent (alpha = 0). This will allow symbols of different shape to be seen when lying over one another. Examples of how to do this can be found in Target Diagram Example 7 and Taylor Diagram Example 9.

Q2. Is there an easy way to check whether points within a target or Taylor diagram occupy the same location?

A2. Use the check_duplicate_stats function to find the pairs of points that reside within a certain percentage distance of each other (default is 1%), and then use the report_duplicate_stats function to report these pairs of points. Examples of their usage can be found in Target Diagram Example 7 and Taylor Diagram Example 9.

Q3. Is there a way to easily change the size of the fonts on the target and Taylor diagrams?

A3. This is possible by specifying default properties for the figure within your main program to dynamically change the font size of all the text. For example, to set all the text to use a font size of 18 pt include the following statement:

set(gcf,'DefaultAxesFontSize',18);

As shown in the example programs, you can also set the figure size and line width for the figures using the pair of statements:

set(gcf,'units','inches','position',[0,10.0,14.0,10.0]);

set(gcf, 'DefaultLineLineWidth', 1.5);

Of course, you can always choose to edit the functions in the SkillMetrics functions to tailor the diagram properties to your preferences.

Q4. How to change the font size of the axis tick label, axis label, and legend label?

A4. You can simultaneously change all of these labels by specifying the font size in the axis handle returned by the target_diagram() function:

[hp, ht, axl] = target_diagram(…);

FontSize = 24;

set(axl,'FontSize',FontSize);

Refer to the target4.m example program where the above commands have been commented out.

For the taylor_diagram() function, similar statements are used to change the STD axis:

[hp, ht, axl] = taylor_diagram(…);

FontSize = 24;

set(axl.std,’FontSize',FontSize);

Refer to the taylor9.m example program where the above commands have been commented out.

If the error you receive is that 'origin' is not a valid or recognized value for the XAxisLocation property, you may be using a release older than release R2015b which is when that value was added as an option for the XAxisLocation property.

Q5. How to change the font size of only the tick labels and axis labels?

A5. You can change the font size of the tick labels and axis labels by specifying the font size for XAxis and YAxis in the axis handle returned by the target_diagram() and taylor_diagram() functions.

For the target diagram:

[hp, ht, axl] = target_diagram(…);

FontSize = 24;

axl.XAxis.FontSize = FontSize;

axl.YAxis.FontSize = FontSize;

Refer to the target4.m example program where the above commands have been commented out.

For the Taylor diagram, a similar approach is used for the STD tick labels and axis labels (note the “axl.std”):

[hp, ht, axl] = taylor_diagram(…);

FontSize = 24;

axl.std.XAxis.FontSize = FontSize;

axl.std.YAxis.FontSize = FontSize;

To change the RMSD contour labels and axis label a different set of commands must be used because of the specialized nature of their display: each letter in “RMSD” is a separate text element because it must be individually rotated, and each contour label is also a separate text element.

[hp, ht, axl] = taylor_diagram(…);

FontSize = 24;

% Change font size of RMSD contour labels

for i = 1:length(axl.rms.tickLabel)

`axl.rms.tickLabel(i).FontSize = FontSize;`

end

% Change font size of only RMSD label

for i = 1:length(axl.rms.XLabel)

axl.rms.XLabel(i).FontSize = FontSize;

end

Refer to the taylor9.m example program where the above commands have been commented out.

Q6. How to change the font size of only the axis labels?

A6. You can change the font size of only the axis labels by specifying the font size for ‘xlabel’ and ‘ylabel’ in the axis handle returned by the target_diagram() and taylor_diagram() functions.

For the target diagram:

[hp, ht, axl] = target_diagram(…);

FontSize = 24;

xl = get(axl,'xlabel');

yl = get(axl,'ylabel');

xl.FontSize = FontSize; yl.FontSize = FontSize;

Refer to the target4.m example program where the above commands have been commented out.

For the Taylor diagram, a similar approach is used for the STD axis labels:

[hp, ht, axl] = taylor_diagram(…);

FontSize = 24;

xl = get(axl.std,'xlabel');

yl = get(axl.std,'ylabel');

xl.FontSize = FontSize; yl.FontSize = FontSize;

To change the RMSD axis label a different set of commands must be used because of the specialized nature of their display: each letter in “RMSD” is a separate text element because it must be individually rotated.

[hp, ht, axl] = taylor_diagram(…);

FontSize = 24;

for i = 1:length(axl.rms.XLabel)

`axl.rms.XLabel(i).FontSize = FontSize;`

end

To change the Correlation Coefficient axis label, the font size of each letter must be changed because it is a separate text element that is individually rotated.

[hp, ht, axl] = taylor_diagram(…);

FontSize = 24;

for i = 1:length(axl.cor.XLabel)

`axl.cor.XLabel(i).FontSize = FontSize;`

end

Refer to the taylor9.m example program where the above commands have been commented out. the above commands have been commented out.

Q7. How to change the font size of only the legend?

A7. You can change the font size of the legend by obtaining the legend handle of the current figure and specifying the font size.

[hp, ht, axl] = target_diagram(…);

FontSize = 24;

hLegend = findobj(gcf, 'Type', 'Legend');

set(hLegend,'FontSize',FontSize);

Refer to the target4.m and taylor9.m example programs where the above commands have been commented out.

Q8. How to change the font size of only the marker labels?

A8. You can change the font size of the marker labels by setting the Fontsize in the text handle returned by the target_diagram() and taylor_diagram() functions.

[hp, ht, axl] = target_diagram(…);

FontSize = 24;

for i = 1:length(ht)

`ht(i).FontSize = FontSize;`

end

Refer to the target2.m and taylor3.m example programs where the above commands have been commented out.

Q9. When I use the Skill Metrics Toolbox to plot Taylor diagrams I get the error:

Attempt to reference field of non-structure array.

Error in setMarkerColor (line 38) hMarker = handle.MarkerHandle;

Error in plot_pattern_diagram_markers (line 158) setMarkerColor(h,option.markerColor,alpha); % Apply transparency to marker

Error in taylor_diagram (line 168) [hp, ht] = plot_pattern_diagram_markers(X,Y,option);

Error in taylor1 (line 74) [hp, ht, axl] = taylor_diagram(sdev,crmsd,ccoef);

Is there a fix to this problem?

A9. This problem occurs with earlier Matlab releases such as R2013b. The hidden MarkerHandle graphics property does not exist or is not accessible. The setMarkerColor function has been modified to be smarter about testing for this case and to do nothing if it is encountered. The consequence is that the markers in the legend may not be consistent with those in the diagram, such as markers with empty faces in the diagram (alpha=0) but markers with filled faces in the legend (alpha=1). This updated function was made available as of 4/26/2018.

Q10. How to control the display value of the RMS circles? My values are in the range [0 - 0.003], and on the diagram I am unable to display 0:0.1:1 instead it's 0:0:1.

A10. You can control the number of significant digits displayed for the RMS contours by using the rmslabelformat option. An example of its usage can be found in Taylor Diagram Example 3. For the specific problem stated in the question you would likely want to use:

[hp, ht, axl] = taylor_diagram(sdev,crmsd,ccoef,'rmslabelformat','%.3f');

Refer to Taylor Diagram Example 3 for an example of usage.

Q11. The graphs generated through the Skill Metrics Toolbox show individual model RMSD values on my Taylor diagram that are different from the RMSD values calculated from my raw CSV data. Why?

A11. The RMSD contours displayed on the Taylor diagram are centered RMSD. The convention for Taylor diagrams is to use the "RMSD" label rather than "CRMSD". As a consequence, many users mistakenly calculate these centered RMSD using the "rmsd" function rather than the "centered_rms_dev" in the Skill Metrics Toolbox:

rmsd = rms_dev(pred,obs); % root-mean-square deviation

crmsd = centered_rms_dev(pred,obs); # centered-root-mean-square deviation

Make certain you are calculating centered RMSD values from your raw data when wishing to compare against the values plotted in the Taylor diagram. Note that the taylor_statistics function returns CRMSD values and not RMSD.

Q12. The centered RMSD values values calculated from my raw CSV data do not appear on the Taylor diagrams where they should relative to the contours. Why?

A12. Check whether you are calculating the statistics for each model using a different set of observations for each model. That is the set of data for each model has its own unique set of observation data to which it is paired. This is a mistake commonly made by users inexperienced in the use of these diagrams. A Taylor diagram is only meaningful if you calculate all your model predictions with respect to the same set of observations.

The key point to understand is that in the Taylor diagram the Centered RMSD (CRMSD) contours have an origin that is specified by the value of the standard deviation (SDEV) of the observations. If different observations are used for the statistics calculated for the differences between each model and observation, then the standard deviation of the observations changes for each model point. The RMSD contours change position accordingly as do the locations of the model points in the Taylor diagram. Comparing the location of the model points relative to the observation RMSD point on the x-axis then becomes meaningless as it is not a constant reference. The underlying Taylor criterion is not satisfied and the value of the diagram is lost.

To visually illustrate, I’ve created three Taylor diagrams below using model predictions that each have separate observations and for which the statistics were calculated using these data. In each Taylor diagram the standard deviation of the observations paired with a different model is used: M3, M5, and M9. The statistics used in the creation of each Taylor diagram is shown above the diagram with "N" column showing the number of observations. The "Obs" line shows the observation standard deviation used in the Taylor diagram (sdevr) and serves to identify the model predictions to which it is paired. As these figures clearly show, the RMSD contours in the Taylor diagrams change, the position of the points relative to the contours are different in each case, and it is not straightforward to draw a conclusion as to the best model result.

 Model      N       crmsd      ccoef      sdevf      sdevr 
_______    ____    _______    _______    _______    _______

{'Obs'}    1868          0          1     1.4402     1.3996
{'M1' }    2588    0.77725    0.76919     1.1302     1.1566
{'M2' }    1183    0.82966    0.53524    0.88322     0.8357
{'M3' }    1868    0.98048    0.76194     1.4402     1.3996
{'M4' }     301     1.3541    0.79877     1.7062      2.246
{'M5' }     299     1.6022    0.88196    0.47943      2.009
{'M6' }     286     1.5867    0.86699    0.50856     2.0072
{'M7' }     184    0.68743     0.7544    0.61906     1.0215
{'M8' }     230    0.40642     0.9372     1.1647     1.0792
{'M9' }     828    0.67395    0.75299     1.0157    0.85124

 Model      N       crmsd      ccoef      sdevf      sdevr 
_______    ____    _______    _______    _______    _______

{'Obs'}     299          0          1    0.47943      2.009
{'M1' }    2588    0.77725    0.76919     1.1302     1.1566
{'M2' }    1183    0.82966    0.53524    0.88322     0.8357
{'M3' }    1868    0.98048    0.76194     1.4402     1.3996
{'M4' }     301     1.3541    0.79877     1.7062      2.246
{'M5' }     299     1.6022    0.88196    0.47943      2.009
{'M6' }     286     1.5867    0.86699    0.50856     2.0072
{'M7' }     184    0.68743     0.7544    0.61906     1.0215
{'M8' }     230    0.40642     0.9372     1.1647     1.0792
{'M9' }     828    0.67395    0.75299     1.0157    0.85124

 Model      N       crmsd      ccoef      sdevf      sdevr 
_______    ____    _______    _______    _______    _______

{'Obs'}     828          0          1     1.0157    0.85124
{'M1' }    2588    0.77725    0.76919     1.1302     1.1566
{'M2' }    1183    0.82966    0.53524    0.88322     0.8357
{'M3' }    1868    0.98048    0.76194     1.4402     1.3996
{'M4' }     301     1.3541    0.79877     1.7062      2.246
{'M5' }     299     1.6022    0.88196    0.47943      2.009
{'M6' }     286     1.5867    0.86699    0.50856     2.0072
{'M7' }     184    0.68743     0.7544    0.61906     1.0215
{'M8' }     230    0.40642     0.9372     1.1647     1.0792
{'M9' }     828    0.67395    0.75299     1.0157    0.85124

Q13. How to add more radial RMSD contours?

A13. You can specify the RMSD contours using the tickRMS option as well as control the precision of the numeric labels using the rmsLabelFormat option:

hp, ht, axl] = taylor_diagram(sdev,crmsd,ccoef, ... 'tickRMS',0.0:20.0:40.0, ... 'rmsLabelFormat','%.1f');

Q14. Is it possible to limit the correlation range within a Taylor diagram when there is a cloud of data with similar correlation values so as to make the plot clarity better?

A14. It is not possible to limit the correlation range because the Taylor diagram is based on the similarity of the equation relating the various statistics with the Law of Cosines (see “Taylor Diagram Primer” document). Furthermore, if your data points are that close together one has to question whether the differences are significant.