#494 Plotting error

closed-fixed
nobody
None
5
2013-05-25
2012-10-21
ema
No

I am experiencing problems when plotting on file (i.e. device, /encapsulated). I tried to plot a simple graph on a .eps file using the following procedure:

pro example

x=findgen(1000)
y=x^2

;; *** first plot with a dimension of (xsize, ysize) = (14, 9) (inches) *** ;;
set_plot,'ps'
device, /encapsulated, filename='ex_GDL.eps',/inches, xsize=14,ysize=9
plot, x, y
device,/close
set_plot,'x'

;; *** second plot with a dimension of (xsize, ysize) = (28, 18) (inches) *** ;;
set_plot,'ps'
device, /encapsulated, filename='ex_GDL_1.eps',/inches, xsize=28,ysize=18
plot, x, y
device,/close
set_plot,'x'

end

I obtain two plots with exactly the same dimension!

Opening these two files in a text editor, the first lines of each file contain the following informations:

file -> ex_GDL.eps (xsize = 14, ysize = 9, /inches)
--------- HEADER ------------
%!PS-Adobe-2.0 EPSF-2.0
%%BoundingBox: 26 218 533 533
%%%%%%%%%%%%%%%%%%%%%
%%Title: PLplot Graph
%%Creator: PLplot Version 5.9.9
%%CreationDate: Sun Oct 21 15:04:59 2012
%%Pages: (atend)
%%EndComments

file -> ex_GDL_1.eps (xsize = 28, ysize = 18, /inches)
--------- HEADER ------------
%!PS-Adobe-2.0 EPSF-2.0
%%BoundingBox: 26 218 533 533
%%%%%%%%%%%%%%%%%%%%%
%%Title: PLplot Graph
%%Creator: PLplot Version 5.9.9
%%CreationDate: Sun Oct 21 15:04:59 2012
%%Pages: (atend)
%%EndComments

If I the same program is used to plot with IDL, I obtain:

file -> ex_IDL.eps (xsize = 14, ysize = 9, /inches)
--------- HEADER ------------
%!PS-Adobe-3.0 EPSF-3.0
%%BoundingBox: 0 0 1008 648
%%Title: Graphics produced by IDL
%%For: emanuele@emanuele.local, /Users/emanuele
%%Creator: IDL Version 7.0, Mac OS X (darwin i386 m32)
%%CreationDate: Sun Oct 21 15:06:42 2012
%%DocumentData: Clean7bit
%%LanguageLevel: 1
%%PageOrder: Ascend
%%Pages: (atend)
%%DocumentNeededResources: (atend)
%%EndComments
%%BeginProlog
%+ prolog.ps -- Prolog for IDL generated PostScript files
%+ Copyright (c) 1988-2007 ITT Visual Information Solutions. All Rights Reserved.
%v 5

file -> ex_IDL.eps (xsize = 28, ysize = 18, /inches)
--------- HEADER ------------
%!PS-Adobe-3.0 EPSF-3.0
%%BoundingBox: 0 0 2016 1296
%%Title: Graphics produced by IDL
%%For: emanuele@emanuele.local, /Users/emanuele
%%Creator: IDL Version 7.0, Mac OS X (darwin i386 m32)
%%CreationDate: Sun Oct 21 15:06:42 2012
%%DocumentData: Clean7bit
%%LanguageLevel: 1
%%PageOrder: Ascend
%%Pages: (atend)
%%DocumentNeededResources: (atend)
%%EndComments
%%BeginProlog
%+ prolog.ps -- Prolog for IDL generated PostScript files
%+ Copyright (c) 1988-2007 ITT Visual Information Solutions. All Rights Reserved.
%v 5

The Bounding box dimensions in IDL are correct, indeed when divided by 72 I obtain exactly the xsize, ysize I wanted. This is no more true in the case of the ex_GDL*.eps file. The dimension is quite strange and different from what I would have expected.

System Informations:
Mac OS 10.8.2
Xcode 4.5.1

gdl-0.9.2 (CVS downloaded two weeks ago)
plplot-5.9.9 installed via macports

Thanks

Discussion

  • giloo

    giloo - 2013-01-03

    Hi,

    This is "normal". You have asked for encapsulated PostScript. page dimensions have a meaning only for non-encapsulated postscript. Encapsulated postscript is meant to be inserted at any size in another postscript document, by an application (openOffice, LaTeX, etc.) . Sizes should work with encapsulated=0 and the most recent CVS version.

     
  • giloo

    giloo - 2013-05-25
    • status: open --> closed-wont-fix
     
  • giloo

    giloo - 2013-05-25

    thanks for the comments. please feel free to report other problems with PS output.

     
  • giloo

    giloo - 2013-05-25
    • status: closed-wont-fix --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks