Prev: bar3 BaseValue
Next: Implemented a filter with fdatool
From: jody Weissmann on 1 Jul 2010 07:53 Hi I try to do a 3 dimensional point plot where different groups of points have different colors. In analogy to the 2-dimensional plot i used hold to do several plot3 commands in the same figure: >> h=figure; hold all >> plot3(sc(29:3000,1),sc(29:3000,2),sc(29:3000,3),'.b') >> plot3(sc(1:28,1),sc(1:28,2),sc(1:28,3),'or') >> hold But this returned a normal 2d plot as if i had used plot() instead of plot3() I noticed that whereas >> plot3(sc(29:3000,1),sc(29:3000,2),sc(29:3000,3),'.b') creates a 3d plot, >> h=figure; hold all >> plot3(sc(29:3000,1),sc(29:3000,2),sc(29:3000,3),'.b') >> hold does not. Can anybody tell me how i can have differently colored points in a 3d plot? Thank You Jody
From: us on 1 Jul 2010 08:08 "jody Weissmann" <jody.xyha(a)gmail.com> wrote in message <i0hvj0$oae$1(a)fred.mathworks.com>... > Hi > I try to do a 3 dimensional point plot where different groups of points have different colors. > In analogy to the 2-dimensional plot i used hold to do several plot3 commands in the same figure: > >> h=figure; hold all > >> plot3(sc(29:3000,1),sc(29:3000,2),sc(29:3000,3),'.b') > >> plot3(sc(1:28,1),sc(1:28,2),sc(1:28,3),'or') > >> hold > But this returned a normal 2d plot as if i had used plot() instead of plot3() > > I noticed that whereas > >> plot3(sc(29:3000,1),sc(29:3000,2),sc(29:3000,3),'.b') > creates a 3d plot, > >> h=figure; hold all > >> plot3(sc(29:3000,1),sc(29:3000,2),sc(29:3000,3),'.b') > >> hold > does not. > > Can anybody tell me how i can have differently colored points in a 3d plot? > Thank You > Jody a hint: help scatter; us
From: jody Weissmann on 1 Jul 2010 09:15 Thanks! That woirks! Jody "us " <us(a)neurol.unizh.ch> wrote in message <i0i0f4$jva$1(a)fred.mathworks.com>... > "jody Weissmann" <jody.xyha(a)gmail.com> wrote in message <i0hvj0$oae$1(a)fred.mathworks.com>... > > Hi > > I try to do a 3 dimensional point plot where different groups of points have different colors. > > In analogy to the 2-dimensional plot i used hold to do several plot3 commands in the same figure: > > >> h=figure; hold all > > >> plot3(sc(29:3000,1),sc(29:3000,2),sc(29:3000,3),'.b') > > >> plot3(sc(1:28,1),sc(1:28,2),sc(1:28,3),'or') > > >> hold > > But this returned a normal 2d plot as if i had used plot() instead of plot3() > > > > I noticed that whereas > > >> plot3(sc(29:3000,1),sc(29:3000,2),sc(29:3000,3),'.b') > > creates a 3d plot, > > >> h=figure; hold all > > >> plot3(sc(29:3000,1),sc(29:3000,2),sc(29:3000,3),'.b') > > >> hold > > does not. > > > > Can anybody tell me how i can have differently colored points in a 3d plot? > > Thank You > > Jody > > a hint: > > help scatter; > > us
|
Pages: 1 Prev: bar3 BaseValue Next: Implemented a filter with fdatool |