[Eeglablist] Plotting standard error with std_plotcurve

Mikołaj Magnuski imponderabilion at gmail.com
Mon Apr 8 19:32:24 PDT 2013


Unfortuantelly I have never used std_plotcurve so I cannot help you
directly. I have nevertheless two suggestions:
1. You could consider using patch - it's pretty straightforward and works
nicely for sd shading. The way to use patch is usually to define vert =[x1,
y1; x2, y2; x3, y3 ... ] coordination matrix for vertices of the object you
want to draw (where each pair x1 -y1 represents x, y coordinates of a given
vertex)  and then plot the patch by(this works correctly only for one 2d
patch object): patch('Vertices', vert, 'Faces', 1:size(vert, 1),
'FaceColor', [r g b], 'EdgeColor', 'none');
(only remember to plot the patch before your main line or order axis
hildren aproprietly)

2. Just to be sure - check if all the input vectors (cuealpha, cuesize) are
actually of the same size. If they are -you can add a keyboard command just
before the error to catch the variables of the function at that moment.
This could give you a hint at what goes wrong within the function.

From: Pete Manza <pete.manza at gmail.com> To: eeglablist at sccn.ucsd.edu Cc:
Date: Mon, 8 Apr 2013 13:02:44 -0400 Subject: [Eeglablist] Plotting
standard error with std_plotcurve

Hi all,

I'm trying to plot a curveplot with the standard error shaded in around the
lines. I got this to work once a while back with std_plotcurve but now I
keep getting errors.

The help page for std_plotcurve says the plotstderr function only works
under some data configurations, but I'm not sure what else to do.

I'm plotting three conditions (cuealpha11, cuealpha13, cuealpha31) that
have a 101x31 structure (31 subjects). The times for the x-axis are in a
101x1 structure.

When I run this command:

std_plotcurve(cuetimes, {cuealpha11; cuealpha13; cuealpha31},
'plotconditions', 'together', 'plotstderr', 'on', 'figure', 'on');

I gut the following error message:

??? Error using ==> fill Vectors must be the same lengths.

Error in ==> fillcurves at 65 h = fill(allpointsx, allpointsy, color);

Error in ==> std_plotcurve at 390 hold on; chandle = fillcurves( allx,
tmpdata(tmpi,:)-tmpstd(tmpi,:),

tmpdata(tmpi,:)+tmpstd(tmpi,:), tmpcol{tmpi}); hold on;

What data structure does this need? The plots for the curves come out just
fine, but I can't get the standard error shading. Thanks very much, Pete
Manza Stony Brook University
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20130409/9c8e515c/attachment.html>


More information about the eeglablist mailing list