To people looking for ptable.m and allstats.m, they are now on github:
https://github.com/gmaze/guillaumemaze
here:
https://github.com/gmaze/guillaumemaze/blob/master/matlab/codes/graphicxPlots/ptable.m
and here:
https://github.com/gmaze/guillaumemaze/blob/master/matlab/codes/statistics/allstats.m

Hi, could you please guide me to the location where you have saved ptable.m and allstat.m. I tried this link http://code.guillaumemaze.org/matlab
but the files are no longer there.

How to create a semicircle taylor's diagram in which Vertical radius is RMSE, The horizontal diameter of semicircle is BIAS which is positive and negative both. Correlation is positive.

Thanks a lot for sharing!
When I run your test I got this error
"Undefined function 'ptable' for input arguments of type 'double'."
Any advice would be appreciated

I've had to normalize my statistics to the observations as I'm looking at various models with different time periods. Is there a way to edit the axis labels so that I can get it to say 'Standard deviation (normalized)' like in http://www-pcmdi.llnl.gov/about/staff/Taylor/CV/Taylor_diagram_examples.pdf? I found the warning in draw_blank_TaylorDiag.m which says do not touch!

Hi,
I am using the function 'taylordiag' as follows:
[ hp, ht, axl ] = taylordiag ( stn { 1 } (2, : ), stn { 1 } ( 3, : ), stn { 1 } ( 4, : ) );

where stn is a 1*23 cell. I need to execute the function 'taylordiag' in each cells i.e. in stn { 1 }, stn { 2 } .... stn { 23 }, so that I can plot all the points that I need in the same plot obtained by executing 'taylordiag'.

Very helpful function. My only issue is that the font sizes are difficult to alter. The axis labels inherit from the original axis, but the tick labels themselves are hardcoded and their handles are hidden on creation, so one can't alter that later.

Thanks for your function, it is indeed very useful. I have a little issue for plotting multiple stations in 1 graph. Let say, I have the following matrices:

With the Standard Deviation (STD_A), RMS (RMS_A), correlations (CORR_A) for four stations. The statistics where obtained using allstats, so:

STD_A(1,:) correspond to the standard deviations obtained via allstats for station # 1,

STD_A(2,:) correspond to the standard deviations obtained via allstats for station # 2, and so on. The same is for RMS_A and CORR_A.

When I try to plot the stations on the same plot, using different colors and markers, the axes after the first plot do not coincide, so the RMS lines and position of the points in the plot are off. I try to play with the axes but it did not work. I know a little bit of MATLAB, but I don't consider myself an expert.

I will really appreciate if you could help me out with this and suggest a way that I could plot all the stations in one plot, so when I plot them the axes from all the plots coincide. I understand that I will have 4 'Obs' point in the X axis, that's what I was trying to do and I would differentiate them by changing colors.

This is a little bit different from the example you have on your short tutorial and on taylordiag_test , because I have 4 different stations in which on each of them I'm comparing observations with model data, and not comparing just one 'Obs' time series with different reanalysis data.

% Deals with names, colors and size of markers for 1st Station

for ii = 1 : length(tt)
set(tt(ii),'fontsize',9,'fontweight','bold','color','g')
set(pp(ii),'markersize',12,'MarkerEdgeColor','g','MarkerFaceColor','g')
if ii == 1
set(tt(ii),'String','Obs');
else
set(tt(ii),'String',alphab(ii-1));
end
end

title(sprintf('Buoy vs WRF: Temperature at 2m'),'fontweight','bold',...
'fontsize',12);

% Deals with Axes of Taylor Diagram

tt = axl(2).handle;
for ii = 1 : length(tt)
set(tt(ii),'fontsize',10,'fontweight','bold');
end

% Deals with names, colors and size of markers CMPCH

for ii = 1 : length(tt)
set(tt(ii),'fontsize',9,'fontweight','bold')
set(pp(ii),'markersize',12)
if ii == 1
set(tt(ii),'String','Obs');
else
set(tt(ii),'String',alphab(ii-1));
end

end

% Deals with names, colors and size of markers CMPCH

for ii = 1 : length(tt)
set(tt(ii),'fontsize',9,'fontweight','bold','color','m')
set(pp(ii),'markersize',12,'MarkerEdgeColor','k','MarkerFaceColor','k')
if ii == 1
set(tt(ii),'String','Obs');
else
set(tt(ii),'String',alphab(ii-1));
end
end

% set the first axes show through & line up the axis limits
set( gca, 'visible', 'off' );
axis( gca, nAx );

end

Thank you very much and any suggestion will be greatly appreciate.

I am trying to use your code to plot a taylor diagram for the below matrix that contains the observations on the first row and 2 sets of models in the other rows:

63.6218 18.6781 0 1.0000
68.3743 19.1750 18.2357 0.5283 50.4187 17.7198 16.2621 0.8528 33.6676 12.4900 32.3996 0.7256
However i am getting the following error:

Error using taylordiag (line 110) taylordiag.m : Something's wrong with data indice(s): 2? You must have: RMSs - sqrt(STDs.2 + STDs(1)2 - 2*STDs*STDs(1).CORs) = 0 !taylordiag.m : Something's wrong with data indice(s): 3? You must have: RMSs - sqrt(STDs.2 + STDs(1)2 - 2*STDs*STDs(1).CORs) = 0 !taylordiag.m : Something's wrong with data indice(s): 4? You must have: RMSs - sqrt(STDs.2 + STDs(1)2 - 2*STDs*STDs(1).CORs) = 0 !

This is a great function. However I am experiencing the same issue as Lang (above). I can get the function to work with my model output, but it seems to only plot the std and corr. The RMSE lines appear on the diagram, but does not relate...Does anyone else agree and perhaps have an answer?

This is a brilliant function. However, I am struggling to get the correlation lines eminating from the origin to plot when the correlation is negative (the points plot perfectly). Is there a way of doing this? Thanks.

Hi all, I can plot the diagram with only positive correlations. However, when I tried to plot both positive and negative correlations (Npan=2) with the same data, I got this error message:
??? Error using ==> set
Value must be numeric.

Error in ==> xlabel at 43
set(h, 'FontAngle', get(ax, 'FontAngle'), ...

Error in ==> xlabel at 22
h = xlabel(gca,varargin{:});

Error in ==> taylordiag at 399
ax(ix).handle =xlabel('Standard deviation','fontweight',axlabweight,...

Error in ==> All_3_years at 601
[hp ht axl] = taylordiag(STD_G21_08,RMS_G21_08,COR_G21_08,'Npan',2,'tickSTD',(0:0.25:1.5));

I could plot using example data sets. But there is no information of rmsd on plot other than some green lines. Whether the rmsd intervals label on the plot?

New ptable and allstats location:
http://code.google.com/p/guillaumemaze/wiki/matlab_codes_graphicxPlots_ptable
and
http://code.google.com/p/guillaumemaze/wiki/matlab_codes_statistics_allstats

To Jenny and others having the same problem,
If you get the error message about: "Something's wrong with the datas", this is because the statistics are wrong and trigonometric relations are wrong as well, see my comment from Jul.28th.
If you also have an error message running the test script, I can't figure out why it would be. The 'statm' matrix should be 5x4. I tried this test on many different platforms, removing all my custom path, etc. and it always works fine. The only reason why you would have an error and I can think about is that somewhere in your path a function overwrites something done in the script which makes it to behave not as expected.
So, please be sure you have the correct test datas and routines. To run the test you'll also need these two functions:
http://code.google.com/p/guillaumemaze/wiki/matlab_routines_ptable
http://code.google.com/p/guillaumemaze/wiki/matlab_routines_allstats

The whole idea of a Taylor diagram is the triangulation of a point given statistical properties it represents in a trigonometric context. A point needs only 2 parameters to be placed in the 2D diagram but we have 3 parameters which can be used. RMSd is therefore not used to plot the point but statistics/trigonometry requirements are checked and require RMSd.

Hi, Can anybody let me know where I can get the subroutine allstats, I tried to get this from here: http://code.google.com/p/guillaumemaze/source/browse/#svn/trunk/matlab/routines

Thank you for the nice script and the examples.
I just have one question. What kind of function is the 'ptable' in the example: ax = ptable([2 3],[2 2;4 6]);
Thanks
Cheers Ben

You'll find bellow links to .mat file with datas you can use to test the routine, and with the scripts I used myself to plot these datas (they are daily time series of sea surface net heat flux at a mooring in the North Atlantic, and results from numerical models to compare with)

hope this will be helpful
cheers
guillaume

.mat file is here: http://guillaumemaze.googlecode.com/svn/trunk/matlab/routines/taylordiag_egdata.mat
the example is here: http://guillaumemaze.googlecode.com/svn/trunk/matlab/routines/taylordiag_test.m

ps: I use the subroutine allstats in this peace of code to make things easier, you can get it here:
http://code.google.com/p/guillaumemaze/source/browse/#svn/trunk/matlab/routines

Does anyone have an example of the inputs required for this script. I am having trouble with it.
I get "Something''s wrong with the datas"
I think it is because I don't understand what is supposed to be in the 1st row of of each of the arrays.

Comment only

24 Sep 2008

C Schwalm

I had started to code this up myself, now I don't have to... These plots are wonderful for diagnostics and comparing numerous models. Well done.

04 Jul 2008

Pierre Hubertin Andrianirina

Updates

10 Feb 2010

1.1

I made the help, well, more helpful regarding all the comments ! I also added a complete example in the zip file.