|
I have got the same Problem i have tried to solve it using this code.
Bit it did not work. Any other ideas?
load PDXprecip.dat; % read data into PDXprecip matrix
month = PDXprecip(:,1); % copy first column of PDXprecip into month
precip = PDXprecip(:,2); % and second column into precip
alpha(0.1)
Q=scatter(month,precip,'x'); % plot precip vs. month with circles
%get(Q)
%set(Q,'CData',[1 0 1]);
P=get(Q,'Children');
set(P(1),'FaceAlpha',0.002)
set(P(1),'FaceVertexAlphaData',[0.1])
set(P(1),'EdgeAlpha',0.00002)
set(P(1),'MarkerEdgeColor',[0 1 0])
set(P(1),'MarkerSize',[15])
set(P(1),'FaceColor',[0 1 0])
set(P(1),'EdgeColor',[0 1 0])
set(P(2),'FaceAlpha',0.2)
set(P(2),'FaceVertexAlphaData',[0.1])
set(P(2),'EdgeAlpha',0.2)
set(P(2),'MarkerEdgeColor',[0 1 0])
set(P(2),'MarkerSize',[15])
set(P(2),'FaceColor',[1 0 0])
set(P(2),'EdgeColor',[1 0 0])
get(P(2))
get(P(3))
refresh
adam <adam.attarian@gmail.com> wrote in message <1f14247a-c43c-47a7-bef0-998fa1b98740@d19g2000prh.googlegroups.com>...
> Hello Friends,
>
> I have a large set of overlapping data points that I would like to
> plot, and give each data point an alpha of say, 0.25, so we'll have
> darker regions where more data points overlap. I can't seem to figure
> out how to use the matlab alpha commands to accomplish this. Can
> anyone help?
>
> I'm plotting the phase space of an elegant strange henon attractor:
> (unoptimized code follows). Basically, I want the resulting plot to
> look a lot better than it does now -- essentially anti-aliasing the
> output by assigning a non-unity alpha value to each data point.
>
> Thanks for the tips,
>
> Adam Attarian
>
> a=-0.89567065;
> b=1.5909586;
> c=1.851583;
> d=2.1974306;
> N=1E6;
>
> for n=2:N
> x(n)=sin(a*y(n-1))-cos(b*x(n-1));
> y(n)=sin(c*x(n-1))-cos(d*y(n-1));
> end
>
> h=plot(x,y,'k.','MarkerSize',1);
|