#528 Postscript device : plot is off-centered and rotated

closed-fixed
nobody
None
5
2013-05-21
2013-04-11
Kalith
No

Test code:

set_plot, 'ps'
device, filename='test.eps', /encapsulated
plot, lindgen(10)
device, /close

The 'test.eps' file that is created does contain the plot data, but:
1) it is aggressively cropped, missing more than half of the plot (lower right corner is ok, but not the others),
2) it is rotated clock wise by 90°.

Converting the file to .pdf (with 'epstopdf') fixes problem 1), but not 2).

I think what I experiment is very similar to bug #3304932, but this report is closed and supposedly fixed since 2011.
I am using the latest CVS version of GDL.

Discussion

1 2 > >> (Page 1 of 2)
  • Kalith
    Kalith
    2013-04-11

    I probably should have added: I'm compiling GDL with pslib (0.4.5), plplot (5.9.9) and ImageMagick (6.7.7) on Linux Mint 14 (~ Ubuntu 12.11) 64bit.

     
  • giloo
    giloo
    2013-04-12

    Hi,
    I have no such problem with current cvs, pslib 0.4.1, lib64magick3-6.6.1 mandriva 2010.2 64 bits
    The output is perfect (taking into account that plplot programmers did not fully understand the power of PostScript)
    eps writing being done 100% with plplot, imageMagick and PSLIB versions are not important in this case anyway.

    ????
    Sorry

     
  • Kalith
    Kalith
    2013-04-12

    Is there any specific option you used when compiling? What is your version of plplot?

     
  • giloo
    giloo
    2013-04-12

    plplot 5.9.9
    config:
    cmake -DCMAKE_BUILD_TYPE=Release -DLIB_SUFFIX=64 -DOPENMP=YES -DHDF=NO -DGRIB=YES -DGSHHS=YES -DUDUNITS=YES -DLIBPROJ4=YES -DPSLIB=YES -DEIGEN3DIR=/usr/local/include/eigen3 .

    I cannot attach files otherwise I would attach my test.eps

     
  • sachahony
    sachahony
    2013-04-12

    I have had a look at this problem and I think it depends on which viewer one uses to display the resulting test.eps
    I have used gv and gsview and the file displays fine albeit rotated.
    When I use okular or evince part of the image is cut. Both evince and okular depend on libspectre for reading postscript files. I suspect that there is a incompatibility between the postscript file and libspectre.

     
  • Kalith
    Kalith
    2013-04-12

    I am actually using evince too, so that could indeed be the problem.

     
  • giloo
    giloo
    2013-04-12

    I confirm the 'feature' of okular.
    Interestingly enough, if in okular you do File->Import Postscript as PDF...
    It is then OK
    (meaning that ps2pdf works)

     
  • Joanna
    Joanna
    2013-04-25

    I have posted a fix for the rotation problem in the patches tracker ID: 3611864. You merely have to change line 86 of deviceps.hpp to
    actStream->sdiori(orient_portrait ? 1 : 0);
    instead of
    actStream->sdiori(orient_portrait ? 90.0: 0.0);

    Regards,
    Joanna

     
  • Joanna
    Joanna
    2013-05-18

    The viewer-dependent offset issue and rotation are now fixed in the cvs. Please try it out and report any more problems.
    (However, the default colour issue is still not fixed. You have to manually specify it: plot,findgen(10),color=0)

    Regards,
    Joanna

     
  • Kalith
    Kalith
    2013-05-18

    I can confirm that the problem is solved, thank you !

     
1 2 > >> (Page 1 of 2)