Function plots table data in a spider (or radar) plot form. Permits independent or global axis limit controls as well as axis labeling and data set labeling. Also allows for the plot axes to be specified. Any inputs other than the data to be plotted can be left as null () which then uses the default settings. Minimum of three axes (three rows to the data) required (technical limitation to a spider plot). No maximum on number of rows (axes) or columns (data sets) but plots can get busy if rational limits are not used.
Examples are included in the help listing for usage methods.
% create a spider plot for ranking the data
% function [f, ca, o] = spider(data,tle,rng,lbl,leg,f)
% inputs 6 - 5 optional
% data input data (MxN) (# axes (M) x # data sets (N)) class real
% tle spider plot title class char
% rng peak range of the data (Mx1 or Mx2) class real
% lbl cell vector axes names (Mxq) in [name unit] pairs class cell
% leg data set legend identification (1xN) class cell
% f figure handle or plot handle class real
% outptus 3 - 3 optional
% f figure handle class integer
% x axes handle class real
% o series object handles class real
% michael arant - jan 30, 2008
Minor bug with automatic placement of legend (may cover the axis labels). Legend can be moved manually.
it is right , very good!
it is ritht , very good!
Hi Michael, I found my mistake. Your file is very helpful.
Can you give suggestion how to change the name of the "Axis"
I d like to change Axis 1, Axis 2,...
to apple, orange, grape, ...
I am a beginner in Matlab.
Tried your code.
but it says:
Error using spider (line 55)
Need data to plot
Can you help?
I am using Matlab R2014b
Verry nice. Thanks!
Am currently using MATLAB 2015...I was unable to get the function to run because of two things...line 136 you had 'isint'...I'm assuming you're checking for an integer, so I changed it to 'isinteger' and it made it past there. Then on line 167 there is reference to this thing called color_index. I see it's only used in one place so I put in some dummy data and was able to get it to output a plot using some of the cases you created.
All in all, this is very cool. Thank you for the submission
Thanks for quick answer.
I already tried to edit with get and set, obviously I made a mistake.
Maybe I have to change "ca" not "x"?
Yes but it is a user action. "X" in the outputs is the axes handles. From there you can edit the axes using get and set. It could have been done from the command line but I arbitrarily left that out. The complexity vs. adaptability compromise.
Is it possible to plot more then two positions after decimal point?
Thanks a lot... It's exactly what I am searching for.
It saves a lot of time for me.
Well done! :)
@ Cyril: With the chop.m-file of this http://www.liv.ac.uk/pjgiblin/maths/mfiles/ side it works.
Works great! I agree with Linus, well commented and very nicely done!
Bravo. Exactly what I need. Thank you
A few users with long legend labels have suggested replacing the location in the legend call (line 222) from ‘northeastoutside’ to ‘best’. This does improve appearance in some cases. I’ll leave it to the user to decide which placement to use.
very nice... Didn't work initially as the 'chop' function seems to be obsolete in R2010a.
Thank you Linus
If you have any ideas on improving the function or the calling of the function, I would like to know. The passing of the axis labels, units, data set labels, etc. is a bit clunky but I could not think of a better method. I am hoping that as others use this someone with get an inspiration.
Brilliant, well commented and very nicely done
Thank you Daniel. Somehow two subfunctions got deleted. Do not know why / how. But fixed here.
Updated for MATLAB 2014 and newer (chop command was obsoleted)
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.