From: shamsi on
I am trying to plot (scatter) a series of data and based on the value of each data point, would like to color that marker with a specific color. Can this be done on Matlab? should I set the colormap? how in the m file?
From: us on
"shamsi " <shamsim(a)bu.edu> wrote in message <i1l32h$hh7$1(a)fred.mathworks.com>...
> I am trying to plot (scatter) a series of data and based on the value of each data point, would like to color that marker with a specific color. Can this be done on Matlab? should I set the colormap? how in the m file?

well...
a hint:
- since you already mentioned it...

help scatter;

us
From: shamsi on
Thank you for the hint. I actually found out that gscatter would do what I need, which is to group different set of data and assign a color for them:

gscatter(vx,vy,mf4,'wbcr','s',80,0)

However, I need these markers (that are square shape) to be filled with the color that I have specified and everything (i.e. fill, set) I have tried hasn't worked. Anyone had done the same thing before.

Note that I can't use markerfacecolor property, as it will just set one color for all markers, or is there a workaround on that?

"us " <us(a)neurol.unizh.ch> wrote in message <i1l4bg$br3$1(a)fred.mathworks.com>...
> "shamsi " <shamsim(a)bu.edu> wrote in message <i1l32h$hh7$1(a)fred.mathworks.com>...
> > I am trying to plot (scatter) a series of data and based on the value of each data point, would like to color that marker with a specific color. Can this be done on Matlab? should I set the colormap? how in the m file?
>
> well...
> a hint:
> - since you already mentioned it...
>
> help scatter;
>
> us
From: Walter Roberson on
shamsi wrote:

> gscatter(vx,vy,mf4,'wbcr','s',80,0)
>
> However, I need these markers (that are square shape) to be filled with
> the color that I have specified and everything (i.e. fill, set) I have
> tried hasn't worked. Anyone had done the same thing before.
>
> Note that I can't use markerfacecolor property, as it will just set one
> color for all markers, or is there a workaround on that?

I am not familiar with gscatter()

scatter() produces a scattergroup object, which has a set of children,
each of which is a patch object with one vertex. You can adjust the
MarkerFaceColor property on the individual patches.