<div dir="ltr">Hi Guido,<div><br></div><div>Yes, I have different plot per seasons..the thing is that each plot is a panel plot, I mean plotD contains 10 plot, and so on..since I have 10 models. Then, I wanted to plot all seasons for all plots..that's why I wanted to do that..maybe there is another simpler way..?</div><div><br></div><div>Thanks!</div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-06-22 15:51 GMT+02:00 Guido Cioni <span dir="ltr"><<a href="mailto:guidocioni@gmail.com" target="_blank">guidocioni@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hi Noelia,<br><div> I assume that your plots are referred to different season, so why do you want to attach them? If your primary goal is to panel your 4 plots in a 2x2 matrix then I would suggest to use the gsn_panel functionality instead.</div><div>You can easily achieve that by doing something like </div><div><pre style="line-height:normal;word-wrap:break-word;white-space:pre-wrap">gsn_panel(wks,(/plotD,plotM,plotJ,plotS/),(/2,2/),True) </pre><div>Maybe I misunderstood the question, let me know.</div></div><div>cheers</div><div><br><div>
<div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br>Guido Cioni</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><a href="http://guidocioni.altervista.org" target="_blank">http://guidocioni.altervista.org</a> </div>
</div>
<br><div><blockquote type="cite"><div><div class="h5"><div>On 22 Jun 2016, at 13:51, Noelia otero <<a href="mailto:noeli1680@gmail.com" target="_blank">noeli1680@gmail.com</a>> wrote:</div><br></div></div><div><div><div class="h5"><div dir="ltr">Hi all,<div><br></div><div>I would like to ask for some help to create a plot attaching 4 column of plots. I saw the example panel_10.ncl , but it is not clear to me how to do it.</div><div><br></div><div><br></div><div>First I am plotting 4 different column of plots:</div><div><br></div><div> plotD=new(10, graphic)</div><div> plotM=new(10, graphic)</div><div> plotJ=new(10, graphic)</div><div> plotS=new(10, graphic)</div><div> </div><div><br></div><div><div> res = True</div><div> res@gsnMaximize = False ; Maximize in frame</div><div> res@gsnDraw = False ; Don't draw plots</div><div> res@gsnFrame = False ; Don't advance frame</div><div> res@cnFillOn = True ; Turn on contour fill</div><div> res@cnInfoLabelOn = False ; Turn off info label</div><div> res@cnLineLabelsOn = False ; Turn off line labels</div><div> res@cnLinesOn = False ; Turn off contour lines</div><div> res@cnLevelSelectionMode = "ExplicitLevels"</div><div> res@lbLabelBarOn = False</div><div> res@gsnAddCyclic = False</div><div><br></div><div> res@mpMinLatF = min(lat)</div><div> res@mpMaxLatF = max(lat)</div><div> res@mpMinLonF = min(lon)</div><div> res@mpMaxLonF = max(lon)</div></div><div><br></div><div> </div><div> :get the values</div><div><div> do i = 0,nplots-1 ;nplots =10</div><div><br></div><div> cwtM = systemfunc("ls " + dirM2(i) + "freq*nc")</div><div> do k = 0,3 ;loop seasons</div><div><br></div><div> fileM = addfile(cwtM(k), "r")</div><div> names = getfilevarnames(fileM)</div><div> model = fileM->$names(j+3)$(0,:,:)</div><div> ;print(names(j))</div><div> ;print(max(model))</div><div><br></div><div> if(k.eq.0) then ; plotting seasons</div><div> plotD(i)= gsn_csm_contour_map(wks,model,res)</div><div> else if(k.eq.1) then</div><div> plotJ(i)= gsn_csm_contour_map(wks,model,res)</div><div> else if(k.eq.2) then</div><div> plotM(i)= gsn_csm_contour_map(wks,model,res)</div><div> else if(k.eq.3) then</div><div> plotS(i)= gsn_csm_contour_map(wks,model,res)</div><div> end if</div><div> end if</div><div> end if</div><div> end if</div><div><br></div><div><br></div><div> end do</div><div> end do</div></div><div><br></div><div>My idea now would be attach all of them to get the 4 columns together. I tried to attach (first, with 2), but it is not working:</div><div><br></div><div> attach_id1 = gsn_attach_plots(plotD,plotM,True,True)<br></div><div><br></div><div>I am not sure if attaching the plots would work here..or if there would be another way to combine different columns of plots. </div><div>I'd really appreciate any suggestion ,</div><div><br></div><div>many thanks</div><div><br></div><div>Noelia</div><div><br></div></div></div></div>
_______________________________________________<br>ncl-talk mailing list<br><a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>List instructions, subscriber options, unsubscribe:<br><a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br></div></blockquote></div><br></div></div></blockquote></div><br></div>