Problem with print

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with print

Clinton Winant-2
ubuntu 16.04, octave 4.2.1
This script produces a screen image with two circles side-by side:

clear;
t=linspace(0,2*pi,181);x=cos(t);y=sin(t);
axes("position",[0.01,0.015,0.48,0.97]);
plot(x,y,'linewidth',2)
axis off;box off;
axes("position",[0.51,0.015,0.48,0.97]);
plot(x,y,'linewidth',2)
axis off;box off
print  -dpdf TestPrint2.pdf

A screenshot is attached showing the image as expected.  The print command produces a pdf file (also attached) that only shows the left hand circle??

Thanks so much!

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave

screen.png (36K) Download Attachment
SIO2grids.pdf (6K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Problem with print

Pantxo
Clinton Winant-2 wrote

> ubuntu 16.04, octave 4.2.1
> This script produces a screen image with two circles side-by side:
>
> clear;
> t=linspace(0,2*pi,181);x=cos(t);y=sin(t);
> axes("position",[0.01,0.015,0.48,0.97]);
> plot(x,y,'linewidth',2)
> axis off;box off;
> axes("position",[0.51,0.015,0.48,0.97]);
> plot(x,y,'linewidth',2)
> axis off;box off
> print  -dpdf TestPrint2.pdf
>
> A screenshot is attached showing the image as expected.  The print command
> produces a pdf file (also attached) that only shows the left hand circle??
>
> Thanks so much!
>
> _______________________________________________
> Help-octave mailing list

> Help-octave@

> https://lists.gnu.org/mailman/listinfo/help-octave
>
>
> screen.png (36K)
> <http://octave.1599824.n4.nabble.com/attachment/4685788/0/screen.png>
> SIO2grids.pdf (6K)
> <http://octave.1599824.n4.nabble.com/attachment/4685788/1/SIO2grids.pdf>

I see the same behavior with gl2ps 1.3.8 (the default on my distro) but
switching to gl2ps 1.4.0 solves the issue for me:

## Download http://geuz.org/gl2ps/src/gl2ps-1.4.0.tgz and put it in
/some/place
tar -xvf gl2ps-1.4.0.tgz
cd gl2ps-1.4.0
cmake .
make
LD_PRELOAD=/some/place/gl2ps-1.4.0/libgl2ps.so octave

Hope this helps,

Pantxo



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Problem with print

Alois Schloegl-7
In reply to this post by Clinton Winant-2


On 2017-12-04 18:25, Clinton Winant wrote:

> ubuntu 16.04, octave 4.2.1
> This script produces a screen image with two circles side-by side:
>
> clear;
> t=linspace(0,2*pi,181);x=cos(t);y=sin(t);
> axes("position",[0.01,0.015,0.48,0.97]);
> plot(x,y,'linewidth',2)
> axis off;box off;
> axes("position",[0.51,0.015,0.48,0.97]);
> plot(x,y,'linewidth',2)
> axis off;box off
> print  -dpdf TestPrint2.pdf
>
> A screenshot is attached showing the image as expected.  The print command
> produces a pdf file (also attached) that only shows the left hand circle??
>
> Thanks so much!
>
>
When the default
 graphics_toolkit

(in my case it's fltk) is set, I can reproduce the problem on Debian 9,
compiled from source.

When you change to gnuplot

   close all;
   graphics_toolkit gnuplot

the above script will work.


Best,
  Alois




_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave

signature.asc (499 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Problem with print

Juan Pablo Carbajal-2
On Tue, Dec 5, 2017 at 12:13 PM, Alois Schloegl
<[hidden email]> wrote:

>
>
> On 2017-12-04 18:25, Clinton Winant wrote:
>> ubuntu 16.04, octave 4.2.1
>> This script produces a screen image with two circles side-by side:
>>
>> clear;
>> t=linspace(0,2*pi,181);x=cos(t);y=sin(t);
>> axes("position",[0.01,0.015,0.48,0.97]);
>> plot(x,y,'linewidth',2)
>> axis off;box off;
>> axes("position",[0.51,0.015,0.48,0.97]);
>> plot(x,y,'linewidth',2)
>> axis off;box off
>> print  -dpdf TestPrint2.pdf
>>
>> A screenshot is attached showing the image as expected.  The print command
>> produces a pdf file (also attached) that only shows the left hand circle??
>>
>> Thanks so much!
>>
>>
>
> When the default
>  graphics_toolkit
>
> (in my case it's fltk) is set, I can reproduce the problem on Debian 9,
> compiled from source.
>
> When you change to gnuplot
>
>    close all;
>    graphics_toolkit gnuplot
>
> the above script will work.
>
>
> Best,
>   Alois
>
>
For many people the printed output of gnuplot is not satisfactory,
lacking (among others) anti-aliasing and too think axes/grid lines.
Specially when compared with the on-screen output of the opengel
toolkits.
GL2PS, even the fixed 4.0 version still produces outputs that do not
look like the screen.
Many times, I just take screenshots of the plots (I use shutter) or
export an svg (really bad when surface, images, colorbars, contours
are exported) and then use inkscape to generate png o pdf.

It is highly undesired, because breaks automation (can do something
using command line inkscape), but I do this only in the last version
of the figure. Before that I just live with what we can get.

I know, I know... I will try to boost this development whenever possible.

Regards,

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Problem with print

Francesco Potortì
>For many people the printed output of gnuplot is not satisfactory,
>lacking (among others) anti-aliasing and too think axes/grid lines.
>Specially when compared with the on-screen output of the opengel
>toolkits.
>GL2PS, even the fixed 4.0 version still produces outputs that do not
>look like the screen.
>Many times, I just take screenshots of the plots (I use shutter) or
>export an svg (really bad when surface, images, colorbars, contours
>are exported) and then use inkscape to generate png o pdf.

For all my "serious" plots I do complete automation using EpsTk.  It is
a long-term, portable solution for producing high-quality EPS plots.

It lacks some features, though.  For example, no transparency.  Recently
I had to use that and I resorted to using Gnuplot to generate an SVG
file which I then converted to PDF using Inkscape in batch mode, all
from an Octave script.

--
Francesco Potortì (ricercatore)        Voice:  +39.050.621.3058
ISTI - Area della ricerca CNR          Mobile: +39.348.8283.107
via G. Moruzzi 1, I-56124 Pisa         Skype:  wnlabisti
(entrance 20, 1st floor, room C71)     Web:    http://fly.isti.cnr.it


_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave