comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: strange !P.multi[0] behavior??
items: Re: strange !P.multi[0] behavior??

strange !P.multi[0] behavior??
type: item
description: Hello, 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. Thanks, Mark ;*********************************************************** * ;*********************************************************** * ;*********** START ********************************** ;*********************************************************** * ;*********************************************************** * pro start,xxx ;!pmap structure is defined window,1,xsize=10,ysize=10 plot,findgen(10),title=dummy pp={p:!p, x:!x, y:!y, z:!z, map:!map, w:0,i:0,j:0,k:0,pp:0} pmap=replicate(pp,200) defsysv,'!pmap',pmap ;so !pmap is filled with a bunch of plot-related dummy variables return end ;*********************************************************** * ;*********************************************************** * ;*********** PMAP **************************** ;*********************************************************** * ;*********************************************************** * pro sub_pmap,k,get=get,put=put compile_opt hidden ;takes care of setting plot variables..... if keyword_set(get) then begin ;!pmap variables are loaded from plot !pmap(k).p = !p !pmap[k].p.position =[!x.window[0],!y.window[0],!x.window[1],!y.window[1] ] !pmap(k).x = !x !pmap(k).y = !y !pmap(k).z = !z !pmap(k).map = !map !…
creator: astroboy.20000
date: 2013-11-07T22:36:18-00:00

Re: strange !P.multi[0] behavior??
type: item
description: 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.")
creator: David Fanning
date: 2013-11-07T23:36:47-00:00

Re: strange !P.multi[0] behavior??
type: item
description: 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.")
creator: David Fanning
date: 2013-11-07T23:45:25-00:00

Re: strange !P.multi[0] behavior??
type: item
description: 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
creator: astroboy.20000
date: 2013-11-08T20:57:33-00:00