help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Unable to get transparent region using patch(...)


From: Troy Vine
Subject: Unable to get transparent region using patch(...)
Date: Fri, 25 Sep 2009 10:37:38 +0200

Hi,

I am using octave 3.2.2 on OS X 10.5.8 installed using the standard installer. Using the code below, I attempted to create a shaded region transparent to the plotted line. With both X11 and AquaTerm (version 1.0.1) the shaded region is opaque to the plot underneath. If I execute the command

> get(p, 'facealpha')

afterwards then I get 0.2 as expected.  What am I doing wrong?

Many thanks,

Troy



> x = [0:pi/12:2*pi];
> plot(x, sin(x))
> xp = [2 2 3 3];
> yp = [ylim fliplr(ylim)];
> p = patch(xp,yp, 'r');
> set(p,'facealpha',0.2);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]