[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FW:Re: transparent surfaces
From: |
Tatsuro MATSUOKA |
Subject: |
FW:Re: transparent surfaces |
Date: |
Wed, 29 Mar 2017 18:19:30 +0900 (JST) |
This is forwarded message to help-octave list.
Tatsuro
Am 29.03.2017 um 10:29 schrieb Tatsuro MATSUOKA:
> ----- Original Message -----
>
>> From: "fibonacci4
>> To: Tatsuro MATSUOKA
>> Cc:
>> Date: 2017/3/29, Wed 16:58
>> Subject: Re: transparent surfaces
>> Am 29.03.2017 um 09:54 schrieb Tatsuro MATSUOKA:
>>> ----- Original Message -----
>>>> From: "fibonacci4
>>>> To: help-octave
>>>> Date: 2017/3/29, Wed 16:18
>>>> Subject: transparent surfaces
>>>> I asked this question on stackoverflow, since there I can show the
>> plots:
>>>>
>> <http://stackoverflow.com/questions/43064837/octave-transparent-surfaces-how>
>>>> I try to plot transparent surfaces in Octave using facealpha set to
>> 0.2. Ok, I have read that this is not implemented, but if I run this code, I
>> get
>> a plot with a transparent plane.
>>>> close all;
>>> clf reset;
>>> cla reset;
>>> graphics_toolkit("gnuplot");
>>> colormap(bone(64));
>>> a1=-1;b=1;h1=0.01;# making a mesh
>>> x=a1:h1:b; x2=a1:h1:b; nz2=length(x2);
>>> [X1,Y1]=meshgrid(x2,x2);
>>> Z1=zeros(nz2,nz2); # function equal to zero on the mesh
>>> s1=mesh(X1,Y1,Z1); view([120 40]);
>>> # properties of the faces and edges
>>> set(s1,'edgecolor','none')
>>> set(s1,'facecolor','black')
>>> set(s1,'facealpha',0.05)
>>> hold on
>>> scatter3([-0.5 0],[-0.5 0],[0.5 -0.5],8,'k','.');# two
>> points one above and one below the plane
>>> # print to eps
>>> print -deps testsurface.eps
>>> Doing this a plot pops up, where the plane is transparent; but the
>>> result
>> of the print command gives a non-transparent
>>> plane, the point below it cannot be seen.
>>> I tried it with fltk, same result, with qt no plane at all. I would like
>>> to
>> print it with the print command, since there are many options, size etc.
>>> Any ideas? Thanks
>>> Karl
>>> On gnuplot, postscript terminal does not support transparent surface.
>>> Thus
>>> print -deps testsurface.eps
>>> on octave does not give a transparent surface.
>>> If your gnuplot supports cairo based terminal, try
>>> print -depscairo testsurface.eps
>>> Tatsuro
>> Thanks Tatsuro,
>> Can you give me a hint, how to install the necessary things for the cairo
>> terminal on Xubuntu 16.04?
>> Or would it work soemhow for fltk or qt?
>> Karl
>
> Perhaps gnuplot on Xubuntu 16.04 supports cairo based terminal.
>
> Start gnuplot on the terminal,
> from gnuplot prompt
>
> set term
>
>
> Then terminal list will appear.
>
> If you see terminals whose name has "cairo", your gnuplot supports cairo
> based terminals.
>
> Tatsuro
>
Thanks Tatsuro,
my gnuplot shows "epscairo" as terminal, but when I use it, there comes an
error message: "cannot find device profile".
But I tried then "dpdfcairo" and this works!! So I have now a solution.
Karl