CosmoCoffee Forum Index CosmoCoffee

 
 FAQFAQ   SearchSearch  MemberlistSmartFeed   MemberlistMemberlist    RegisterRegister 
   ProfileProfile   Log inLog in 
Arxiv New Filter | Bookmarks & clubs | Arxiv ref/author:

IDL's .ps in keynote
 
Post new topic   Reply to topic    CosmoCoffee Forum Index -> Teaching, Papers and Presentations
View previous topic :: View next topic  
Author Message
Simon DeDeo



Joined: 26 Oct 2004
Posts: 46
Affiliation: Santa Fe Institute

PostPosted: December 27 2009  Reply with quote

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?
Back to top
View user's profile [ Hidden ] Visit poster's website
Joaquin Vieira



Joined: 20 Oct 2008
Posts: 2
Affiliation: Caltech

PostPosted: February 25 2010  Reply with quote

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?
Back to top
View user's profile [ Hidden ]
Simon DeDeo



Joined: 26 Oct 2004
Posts: 46
Affiliation: Santa Fe Institute

PostPosted: February 25 2010  Reply with quote

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!
Back to top
View user's profile [ Hidden ] Visit poster's website
Ben Gold



Joined: 25 Sep 2004
Posts: 97
Affiliation: University of Minnesota

PostPosted: February 26 2010  Reply with quote

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

Code:

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. :)
Back to top
View user's profile [ Hidden ] Visit poster's website
Simon DeDeo



Joined: 26 Oct 2004
Posts: 46
Affiliation: Santa Fe Institute

PostPosted: February 26 2010  Reply with quote

Thanks folks! IDL, like General Relativity, is a fundamentally non-linear system...
Back to top
View user's profile [ Hidden ] Visit poster's website
Richard Easther



Joined: 14 Apr 2005
Posts: 15
Affiliation: Yale

PostPosted: March 01 2010  Reply with quote

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_
Back to top
View user's profile  
Simon DeDeo



Joined: 26 Oct 2004
Posts: 46
Affiliation: Santa Fe Institute

PostPosted: March 01 2010  Reply with quote

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!
Back to top
View user's profile [ Hidden ] Visit poster's website
Ben Gold



Joined: 25 Sep 2004
Posts: 97
Affiliation: University of Minnesota

PostPosted: March 01 2010  Reply with quote

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:

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.
Back to top
View user's profile [ Hidden ] Visit poster's website
Joaquin Vieira



Joined: 20 Oct 2008
Posts: 2
Affiliation: Caltech

PostPosted: April 04 2010  Reply with quote

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
Back to top
View user's profile [ Hidden ]
Display posts from previous:   
Post new topic   Reply to topic    CosmoCoffee Forum Index -> Teaching, Papers and Presentations All times are GMT + 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group. Sponsored by WordWeb online dictionary and dictionary software.