Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
M Q writes: > I created a structure, !pmap, that stores the !p, !x, !y, !z, and !map variables so that I could make some plots in one window, then open another window and make plots, and then go back to the first window to make more plots, starting where I left off. As I recall, it worked well. > > However, it doesn't work now, which means either my memory is faulty or else I made some changes that I don't recall. I've included the relevant code below. > > The point is that even though the program sub_pmap recalls the correct !p structure, that doesn't seem to affect the placement of plots. This is clear when you run the program. > > I'm at a loss as to what might be going on here. This is a capability which I found quite useful in the past and which I find that I need again in a big way. You can't set both !P.Multi and !P.Position without getting the total chaos you are experiencing. :-) Comment this line out in Sub_PMap and things will work better for you: ; !pmap[k].p.position =[!x.window[0],!y.window[0],$ !x.window[1],!y.window[1] ] Cheers, David -- David Fanning, Ph.D. Fanning Software Consulting, Inc. Coyote's Guide to IDL Programming: http://www.idlcoyote.com/ Sepore ma de ni thue. ("Perhaps thou speakest truth.")
David Fanning writes: > You can't set both !P.Multi and !P.Position without getting the total > chaos you are experiencing. :-) > > Comment this line out in Sub_PMap and things will work better for you: > > ; !pmap[k].p.position =[!x.window[0],!y.window[0],$ > !x.window[1],!y.window[1] ] By the way, you might find it MUCH easier to use cgLayout to do this. It is a much more flexible way to set up multiple plots and a great deal easier to use under circumstances like this. http://www.idlcoyote.com/idldoc/cg/cglayout.html Cheers, David -- David Fanning, Ph.D. Fanning Software Consulting, Inc. Coyote's Guide to IDL Programming: http://www.idlcoyote.com/ Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Oh duh. What was I thinking? Thanks David. I'll have a look at cglayout. The main reason I came up with sub_pmap and some related routines was that I was doing an analysis with multiple windows open where one window might have one huge plot and four or five small plots around the edges, and another window would be completely different. So, there was a need to carry around the position information. I'm looking forward to your next book. I hope it's not too much of a trial. Mark