

I asked this question on stackoverflow, since there I can show
the plots:
<http://stackoverflow.com/questions/43064837/octavetransparentsurfaceshow>
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 nontransparent
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
_______________________________________________
Helpoctave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/helpoctave


 Original Message 
>From: "fibonacci4
>To: helpoctave
>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/octavetransparentsurfaceshow>
>
>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 nontransparent
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
_______________________________________________
Helpoctave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/helpoctave


>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?
To create transparency, I use the gnuplot backend with gnuplot version 4
and I print to an svg file which I then convert to pdf using Inkscape.
Maybe there are easier paths nowaday, this was the only reasonably
working one that I found two years ago, and it still works in one of my
scripts.
graphics_toolkit ("gnuplot");
gnuplot_binary("gnuplot4");
print([fname ".svg"]);
system(["inkscape exportpdf=" fname ".pdf " fname ".svg], [], 'async');

Francesco Potortì (ricercatore) Voice: +39.050.621.3058
ISTI  Area della ricerca CNR Mobile: +39.348.8283.107
via G. Moruzzi 1, I56124 Pisa Skype: wnlabisti
(entrance 20, 1st floor, room C71) Web: http://fly.isti.cnr.it_______________________________________________
Helpoctave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/helpoctave


 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: helpoctave
>>> 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/octavetransparentsurfaceshow>
>>>
>>> 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 nontransparent
>> 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
_______________________________________________
Helpoctave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/helpoctave


This is forwarded message to helpoctave 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: helpoctave
>>>> 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/octavetransparentsurfaceshow>
>>>> 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 nontransparent
>>> 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
_______________________________________________
Helpoctave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/helpoctave


Am 29.03.2017 um 10:25 schrieb Francesco Potortì:
>> 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?
> To create transparency, I use the gnuplot backend with gnuplot version 4
> and I print to an svg file which I then convert to pdf using Inkscape.
>
> Maybe there are easier paths nowaday, this was the only reasonably
> working one that I found two years ago, and it still works in one of my
> scripts.
>
> graphics_toolkit ("gnuplot");
> gnuplot_binary("gnuplot4");
> print([fname ".svg"]);
> system(["inkscape exportpdf=" fname ".pdf " fname ".svg], [], 'async');
>
Thanks, but as I wrote to Tatsuro, I now have a way, I use "pdfcairo" as terminal. This works.
Don't ask me, why "epscairo" doesn't work for me.
Ciao
Karl
_______________________________________________
Helpoctave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/helpoctave

