Plotting semi-trasnparent patches?

Ben Abbott bpabbott at mac.com
Wed Jan 28 17:43:56 CST 2009


On Jan 26, 2009, at 10:12 AM, Kai Habel wrote:

> Søren Hauberg schrieb:
>> Hi All
>>
>> Is there a way to make a patch (as produced by the 'patch' command)
>> semi-transparent? I tried setting the 'facealpha' property to 0.5 but
>> that didn't do what I expected.
>>
>> BTW. I'm running a checkout of the development sources from some time
>> yesterday.
>>
>> Søren
>>
>> _______________________________________________
>> Help-octave mailing list
>> Help-octave at octave.org
>> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
>>
> Using a development version of gnuplot (4.3.cvs) this can be  
> implemented
> fairly easy. See attached patch. I am hesitating in providing a full
> changeset, since we would depend on a development version of  
> gnuplot. I
> see no easy way to check for this gnuplot feature otherwise we could
> support this conditionally. I think we have to wait for gnuplot  
> release
> which supports this feature.
>
> Kai
> diff -r 0eb83938c8bc scripts/plot/__go_draw_axes__.m
> --- a/scripts/plot/__go_draw_axes__.m   Sun Jan 18 22:01:36 2009 +0100
> +++ b/scripts/plot/__go_draw_axes__.m   Mon Jan 26 16:02:02 2009 +0100
> @@ -568,8 +568,8 @@
>               if (mono)
>                 colorspec = "";
>               else
> -                colorspec = sprintf ("lc rgb \"#%02x%02x%02x\"",
> -                                     round (255*color));
> +                colorspec = sprintf ("lc rgb \"#%02x%02x%02x\"  
> fillstyle transparent solid %f",
> +                                     round (255*color),  
> obj.facealpha);
>               endif
>               withclause{data_idx} = sprintf ("with filledcurve %s",

Kai,

I just pushed __gnuplot_has_feature__.m

This new function can be used to check for the feature  
"transparent_patches". Eventually, we'd like to check for  
functionality. However, for the moment this function checks the  
gnuplot version number.

In any event, please submit a changeset.

Ben




More information about the Help-octave mailing list