IDL's .ps in keynote

Post Reply
Simon DeDeo
Posts: 44
Joined: October 26 2004
Affiliation: Santa Fe Institute
Contact:

IDL''s .ps in keynote

Post by Simon DeDeo » December 27 2009

When I make a plot using IDL, I generally end up with a postscript (or .eps) file.

However, drag-and-drop into Keynote usually leaves me with a figure that is somewhat hard to see -- the lines for the axes are too thin, for example, and in general, the plot doesn't stand out from the background for easy viewing. This is in contrast to how it looks in a paper produced with LaTeX.

Is there a simple way around this? Or should I fuss with the options in IDL to make a separate "keynote friendly" plot?

Joaquin Vieira
Posts: 2
Joined: October 20 2008
Affiliation: Caltech

IDL''s .ps in keynote

Post by Joaquin Vieira » February 25 2010

I always make .eps files with IDL and put them in keynote talks. I think they look fine. I may be stating the obvious, but have you tried making the font bigger and/or the window size smaller?

Simon DeDeo
Posts: 44
Joined: October 26 2004
Affiliation: Santa Fe Institute
Contact:

IDL''s .ps in keynote

Post by Simon DeDeo » February 25 2010

Dear Joaquin -- I wonder if you could perhaps post some sample IDL code that generates a plot and saves it to .eps? I wonder if I am missing an option somewhere that helps improve matters, and it would be the easiest way to see. Thanks for any help!

Ben Gold
Posts: 81
Joined: September 25 2004
Affiliation: University of Minnesota
Contact:

IDL''s .ps in keynote

Post by Ben Gold » February 26 2010

I think if you set enough options you can get what you want. Something like

Code: Select all

plot, x, thick=2, xthick=2, ythick=2, charsize=2, charthick=2
or you can mess with the appropriate system variables. Or both, though they'll probably interact in ways you don't expect, because it's IDL. :)

Simon DeDeo
Posts: 44
Joined: October 26 2004
Affiliation: Santa Fe Institute
Contact:

IDL''s .ps in keynote

Post by Simon DeDeo » February 26 2010

Thanks folks! IDL, like General Relativity, is a fundamentally non-linear system...

Richard Easther
Posts: 16
Joined: April 14 2005
Affiliation: Yale

IDL''s .ps in keynote

Post by Richard Easther » March 01 2010

It is a little crude, but you can take the view in Preview, do a screen grab (Command-control-shift-4, I think to take a snapshot of a given rectangle) and then paste that into keynote.

Just make sure that the image takes up more screen pixels than it will in keynote, and the quality should be fine.

Or save the .eps file to another format (maybe PNG), either directly from IDL or from inside preview

(I am experimenting with IDL for movie making, as it happens_

Simon DeDeo
Posts: 44
Joined: October 26 2004
Affiliation: Santa Fe Institute
Contact:

IDL''s .ps in keynote

Post by Simon DeDeo » March 01 2010

Dear Richard -- I haven't found a good way to do IDL movies.

The main problem is less IDL than the way movie compression works. The sharp edges of a plot and the text tend to get blurred out or given irritating artifacts. The best solution I've found so far is cranking the fidelity up very high, which unfortunatley produces very large movie files (perhaps 100 Mb for five minutes.)

There may be some way to do things with "animated PNG", or something similar, but I could not find a good cheap/free way to go that route.

If you find a solid solution, do let us know!

Ben Gold
Posts: 81
Joined: September 25 2004
Affiliation: University of Minnesota
Contact:

IDL''''s .ps in keynote

Post by Ben Gold » March 01 2010

I've never tried making movies in IDL, but Imagemagick can make animated GIF files (the animated PNG format never really caught on) out of individual frames. It's a set of free command-line image manipulation utilties, and you should be able to install it using your favorite source for UNIX stuff (Fink, MacPorts, compiling from source...)

Once installed, it's as simple as something like

Code: Select all

convert -delay 20 -loop 0 img*.png animated.gif
But if you've got a few thousand images to animate, you probably don't want to go this route.

Joaquin Vieira
Posts: 2
Joined: October 20 2008
Affiliation: Caltech

IDL''s .ps in keynote

Post by Joaquin Vieira » April 04 2010

Here is how I make pretty .eps plots in IDL:

; this sets the color scale to rainbow
loadct, 13

; this sets the font to helvetica
!P.FONT = 1

; this defines some colors
black=0
red = 255
blue = 60
green = 150
yellow = 205
purple = 25
orange = 230
lightblue = 100

; this sets up the .eps file
set_plot, 'ps', /Copy
; here you can change the size of the image and the name and path of the output file
Device,filename='thisfile.eps', /Encapsulated, /color, /close, XSIZE=6, YSIZE=6, /inches

; make your plot here
plot, x, y, /nodata, font=1
oplot, x, y, color=red

legend, ['x = x', 'y=y', 'line', 'line'], color=[black, red, black, black], psym=[1,2,0,0], linestyle=[0,0,1,1], /top, /left, box=1

device,/close

Post Reply