|
On 31 Jan., 11:58, Jos <x...@y.z> wrote:
> saudrey wrote:
>
> > I am trying to draw a boxplot where the height accords to the mean
> > of
> > a vector and a horizontal line according to the mean + variance and
> > the mean - variance (see picture (should be overlaying a box
> > plot)).
> > --- -> mean + variance
> > =A6
> > =A6 -> hear should be the top of the boxplot according to
> > the mean
> > =A6
> > --- -> mean - variance
>
> > could anyone tell me how to draw this. errorbar is a good solution,
> > but it doesn't produce a box, just a line for the mean.
>
> > thanks!
>
> > Deed
>
> use both bar and errorbar.
>
> x=3D1:10 ;
> y =3D 10*rand(size(x)) ;
> L =3D rand(size(x)) ;
> U =3D rand(size(x)) ;
> bar(x,y)
> hold on ;
> h =3D errorbar(x,y,L,U) ;
> delete(h(2)) ; % remove connecting line
> hold off ;
>
> hth
> Jos- Zitierten Text ausblenden -
>
> - Zitierten Text anzeigen -
Thank you very much. Worked great, except for matlab saying
??? Index exceeds matrix dimensions.
Error in =3D=3D> displayLearning at 65
delete(h(2)) ; % remove connecting line
but I replaced
h =3D errorbar(x,y,L,U) ;
delete(h(2)) ;
with
h =3D errorbar(x,y,L,U,'+') ;
which also made the connecting lines dissapear.
thank you very much again
Deed
|