Re: using map_set with postscript device [message #63822 is a reply to message #63821] |
Thu, 20 November 2008 21:22   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
pepperjack writes:
> I'm trying to overplot a contour with a map using contour .... /
> overplot followed by map_set ... /noerase. It works fine when I output
> it to my screen, but when I output it to a .eps file the map_set turns
> the entire plot one colour so I lose my contours.
>
> Here is my code:
>
> set_plot, 'ps'
> device, /encapsulated, filename='chi.eps'
> device, /color
> !p.region = [0.0, 0.1, 1, 1]
> loadct, 33
> range = max(chi) - min(chi)
> step = range/20.
> clevs = (indgen(21)*step) + min(chi)
> ccols = indgen(20)*(254/19)
> contour, chi, x, y, levels=clevs,c_col=ccols,/cell_fill,/overplot
> map_set,/noerase,/continents,/grid,/isotropic
> colorbar, clevs,ccols, format='(i4)'
> device,/close
>
> I'd really appreciate any help anyone can offer with this.
Well, I'm having a REALLY hard time seeing how this code
"works fine" when output to the display. :-)
Here are a couple of things I see immediately:
1. Remove the OVERPLOT keyword to Contour. Otherwise, you will
draw over the top of what is already in the display or file.
2. You need a BITS_PER_PIXEL=8 keyword on your DEVICE command.
3. There is no way your contour plot and your map are going
to align, unless you specify a POSITION for them.
4. If that Colorbar routine came from my web page, it isn't
going to work at all if called like that.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|