Hi, everybody, did anyone ever tried to adopt the second (Coyote Graphics) example from this post http://www.idlcoyote.com/cg_tips/compcont.php so that it draws directly into Postscript? To draw into a graphic window and ten save it as a postscript works fine for me, but I need to do it 27x4 times, would be nice to have a way to plot it directly into postscript file.
Thanks!
sasha.mozg...@gmail.com writes: > did anyone ever tried to adopt the second (Coyote Graphics) example from this post > http://www.idlcoyote.com/cg_tips/compcont.php > so that it draws directly into Postscript? To draw into a graphic window and ten save it as a postscript works fine for me, but I need to do it 27x4 times, would be nice to have a way to plot it directly into postscript file.
I would do it like this:
PS_START, Filename='whatever.ps'
.... commands from the article
PS_END
Cheers,
David
-- David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/ Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Dear David, thank you so much for your (as always) fast response.
I would have two further questions. 1. What if I do not need to create a resizeable graphic window - I just want to create PostScript file containing the filled contour plot on the map. 2. Ideally, I need multiple panels, each on its own copy of the map. Would your procedure work by just setting !p.Multi varialbles?
sasha.mozg...@gmail.com writes:
> I would have two further questions. > 1. What if I do not need to create a resizeable graphic window - I just want to create PostScript file containing the filled contour plot on the map.
Then I would leave the keywords that create a resizeable graphics
window off the commands.
> 2. Ideally, I need multiple panels, each on its own copy of the map. Would your procedure work by just setting !p.Multi varialbles?
It is as simple as 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 thue. ("Perhaps thos speakest truth.")
Ok, here is what I'm doing (after defining data, lon, lat and nlevels) in order to simply plot a data projected on map directly into PostScript file:
=======
set_plot, 'PS'
PageParam = PSWINDOW(/LANDSCAPE, /CM, PAGESIZE='A4')
-- David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/ Sepore ma de ni thue. ("Perhaps thos speakest truth.")
-- David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/ Sepore ma de ni thue. ("Perhaps thos speakest truth.")
>> 2. Ideally, I need multiple panels, each on its own copy of the map. Would >>your procedure work by just setting !p.Multi varialbles?
> It is as simple as that! :-)
Does not work for me: when setting !p.multpi=[0, 2, 2, 0, 0] and running it for just one panel, I get the contour plot on the first panel, empty second panel, the grid on the third one, and the map - on the fourth. When I try to go through cgControl (put it = 0 before this three commands, add them as /AddCnd and set it 1at the end), it accept /AddCmd in cgContour, but crashes ("X connection to localhost:11.0 broken (explicit kill or server shutdown") when I try to add /AddCmd to cgMap_Grid and cgMap_Continents.
In plus, in grid, among [-180,180] longitudes only the positive ones are labeled, and the latitude lines are missing.
sasha.mozg...@gmail.com writes:
> Does not work for me: when setting !p.multpi=[0, 2, 2, 0, 0] and running it for just one panel, I get the contour plot on the first panel, empty second panel, the grid on the third one, and the map - on the fourth. When I try to go through cgControl (put it = 0 before this three commands, add them as /AddCnd and set it 1at the end), it accept /AddCmd in cgContour, but crashes ("X connection to localhost:11.0 broken (explicit kill or server shutdown") when
I try to add /AddCmd to cgMap_Grid and cgMap_Continents.
> In plus, in grid, among [-180,180] longitudes only the positive ones are labeled, and the latitude lines are missing.
> Would I also be damned by some IDL Gods?..
Well, this is the first I've heard about !P.Multi.
It helps to write code if you have all the pertinenet
informaton when you start. :-)
I'm teaching a class for the next couple of days, so
I have limited time, but I'll see if I can get to
this. You will have to remove all POSITION keywords
if you are going to use !P.Multi, though, or all will
be confusion of the type you are experiencing. :-)
Cheers,
David
-- David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/ Sepore ma de ni thue. ("Perhaps thos speakest truth.")
Thank you for he quick answer, David.
There is always a way to work-around the machine when you are not educated enough:
I will create the plots one by one, then combine them with convert +/-append into 2x2 panels. :)
The missing longitude grid labels and latitude lines have however nothing to do with !p.multi. Is it possible that it only works for [0,360] and not [-180,180] longitudes?
sasha.mozg...@gmail.com writes:
> The missing longitude grid labels and latitude lines have however nothing to do with !p.multi. Is it possible that it only works for [0,360] and not [-180,180] longitudes?
No, this is a long story and involves what I think is
a bug in the Map_Grid program, that I have been unable
to fix successfully so far. It rears its ugly head
often when working with global map projections in projected meter space. I should write an article
about it. I've been struggling with it for a long time.
I have been trying to avoid writing my own Map_Grid
program, but I'm thinking that may be the only way out
of this problem.
As far as doing map projections as multi-plots is concerned,
there are some definite problems with my code, that I am
not going to be able to solve until who knows when. I am
WAY behind on my real work, and need to get some of that
done before I lose my job. :-(
I'll work on this as I can.
Cheers,
David
-- David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/ Sepore ma de ni thue. ("Perhaps thos speakest truth.")