using map_set with postscript device [message #63824] |
Thu, 20 November 2008 20:36  |
pepperjack
Messages: 2 Registered: November 2008
|
Junior Member |
|
|
Hello
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.
Thanks.
|
|
|
Re: using map_set with postscript device [message #63941 is a reply to message #63824] |
Sun, 23 November 2008 14:45  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
pepperjack writes:
> Is there an easier way to work out what vectors should go in the
> POSITION keyword? These numbers appear to be totally random to me, and
> I found them through trial and error...
I think they appear random to you for a couple of reasons.
First, you muck around with !P.REGION, which is going to
throw every thing completely off. POSITION is specified
as the lower-left x and y, and upper right x and y of
a rectangle that specifies the location of the axes, in
normalized coordinates. (Coordinates that go from 0 to 1 in
the "window".) When you muck up !P.REGION who knows what the
numbers mean? :-)
Secondly, since you are issuing the MAP_SET command *after*
the CONTOUR command, the contour command is being drawn on
the axis that were specified in the program you ran *before*
you called this one!!!! This will tend to *REALLY* throw
you off the track. In fact, it will make you absolutely
crazy sooner or later, because nothing will ever make
any sense to you.
I'll be honest with you, if this program works, it is
a miracle, and I think you should be satisfied with that. :-)
I'd have a look at this article to at least see in which
order things *should* be done in:
http://www.dfanning.com/color_tips/fill_colors.html
Cheers,
David
>
> Is there a way to manage the file size of the resulting .eps? I need
> to compile about 100 of these figures into a latex document and it is
> rapidly growing to an unmanageable size.
>
>
--
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.")
|
|
|