On Wednesday, July 2, 2014 2:18:38 PM UTC-4, David Fanning wrote:
> David Fanning writes:
>
>
>
>>
>
>> 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].
>
>
>
> You might also find this article helpful:
>
>
>
> https://www.idlcoyote.com/code_tips/multiplots.php
>
>
>
> 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.")
Good article. I'm still missing something though. I'd like to use coyote graphics because I'm trying to make publication figures and from my understanding better quality can be gotten using cgWindow and ImageMagick. When I run my code I see the maps then they flash away and i'm left with just 4 colored lines that should be overlaid on the maps. I've tried with the mapCoord statements both inside and outside the loop both with the same results.
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]
cgWindow, wxsize=800, wysize=800, wmulti=[0,2,3], xomargin=[2,6], woymargin=[2,8], $ wtitle='Plot_DAQ_Trajectories'
ShoreData = './gshhs/gshhs_h.b'
mapCoord = Obj_New('cgmap', 'Stereographic', Ellipsoid='WGS 84', Limit=limit, $
center_lat=centarlat, center_lon=centerlon, /AddCmd)
mapCoord -> Draw, /AddCmd
cgMap_Grid, map=mapCoord, /box, /AddCmd
cgMap_Continents, map=mapCoord, /continents, /countries, /usa, /AddCmd
for j=0,5 do begin
cgplots, Avg1000Lon, Avg1000Lat, map=mapCoord, color='orange', thick=4, /AddCmd
cgplots, Avg1500Lon, Avg1500Lat, map=mapCoord, color='red', thick=4, /AddCmd
cgplots, Avg2000Lon, Avg2000Lat, map=mapCoord, color='blue', thick=4, /AddCmd
cgplots, Avg2500Lon, Avg2500Lat, map=mapCoord, color='green', thick=4, /AddCmd
cgplots, Avg3000Lon, Avg3000Lat, map=mapCoord, color='cyan', thick=4, /AddCmd
cgplots, Avg3500Lon, Avg3500Lat, map=mapCoord, color='magenta', thick=4, /AddCmd
end
cgControl, Execute=1
|