On Wednesday, July 2, 2014 1:58:16 PM UTC-4, David Fanning wrote:
> Morgan Silverman writes:
>
>
>
>> I'm struggling to create a 6 panel multiple graph plot. I started trying to use !P.Multi=[3,3,1] and tried to follow these suggestions https://www.idlcoyote.com/tips/oplot_pmulti.html since I need to put several lines of data on each graph separately. I have a map background for each plot that I've created using
>
>>
>
>> mapCoord = Obj_New('cgmap', 'Stereographic', Ellipsoid='WGS 84', Limit=limit, $
>
>> center_lat=centarlat, center_lon=centerlon, position=pp)
>
>> mapCoord -> Draw
>
>> cgMap_Grid, map=mapCoord, /box
>
>> cgMap_Continents, map=mapCoord, /continents, /countries, /usa, /advance
>
>> cgplots, Avg2000Lon, Avg2000Lat, map=mapCoord, color='blue', thick=4
>
>> p1 = !P & x1 = !X & y1 = !Y
>
>>
>
>> I'm hoping someone can give me some guidance because what I'm doing is not working. Thank you.
>
>
>
> Yes, I can see that. If you are trying to get your six plots in three
>
> columns and two rows, you might try setting up !P.Multi=[0,3,2].
>
>
>
> Does that help?
>
>
>
> 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.")
Well that made it the correct number of panels but the graphs continue to flash across the screen over and over until I'm left with a pieces of the graph in scattered locations (i.e. map in one corner, grid in another, data in another). I also tried to use cgWindow and wMulti since that's what I was originally using but get the same problem with the the graphs flashing across the screen for several seconds. In an unrelated question, I also get this error message when using cgWindow and mapCoord CGCOORD::DRAW: Received unexpected keywords.
** Structure <1fca1968>, 1 tags, length=2, data length=2, refs=1:
ADDCMD INT 1
Thanks,
Morgan
My cgWindow code is...
loadct, 33
pp=[0.1,0.1,0.95,0.90]
lonmin = -125
lonmax = -65
latmin = 25
latmax = 60
centerlon = (lonmax-lonmin)/2.0 + lonmin
centerlat = (latmax-latmin)/2.0 + latmin
limit = [latmin, lonmin, latmax, lonmax]
xrange = [lonmin, lonmax]
yrange = [latmin, latmax]
mapCoord = Obj_New('cgmap', 'Stereographic', Ellipsoid='WGS 84', Limit=limit, $
center_lat=centarlat, center_lon=centerlon, position=pp, /AddCmd)
mapCoord -> Draw, /AddCmd
cgMap_Grid, map=mapCoord, /box, /AddCmd
cgMap_Continents, map=mapCoord, /continents, /countries, /usa, /AddCmd
cgControl, Multi=[0,3,2]
wids = cgQuery(Title=titles, Count=count)
if (count ne 0) then begin
windex=where(titles eq 'Plot_DAQ_Trajectories', tcnt)
endif else tcnt = 0
if (tcnt eq 0) then begin
cgWindow, wtitle='Plot_DAQ_Trajectories', wxsize=800, wysize=800
endif else begin
cgSet, wids[windex[0]]
endelse
cgControl, Execute=0
ShoreData = './gshhs/gshhs_h.b'
cgplots, Avg2000Lon, Avg2000Lat, map=mapCoord, color='blue', thick=4, WMulti=[0,2,3], /AddCmd
cgControl, Execute=1
|