<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Noelia,<br class=""><div class=""> 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 class="">You can easily achieve that by doing something like </div><div class=""><pre style="font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; line-height: normal; widows: 1; word-wrap: break-word; white-space: pre-wrap;" class="">gsn_panel(wks,(/plotD,plotM,plotJ,plotS/),(/2,2/),True) </pre><div class="">Maybe I misunderstood the question, let me know.</div></div><div class="">cheers</div><div class=""><br class=""><div class="">
<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; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class="Apple-interchange-newline">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; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="http://guidocioni.altervista.org" class="">http://guidocioni.altervista.org</a> </div>
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On 22 Jun 2016, at 13:51, Noelia otero <<a href="mailto:noeli1680@gmail.com" class="">noeli1680@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi all,<div class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class=""><br class=""></div><div class="">First I am plotting 4 different column of plots:</div><div class=""><br class=""></div><div class=""> plotD=new(10, graphic)</div><div class=""> plotM=new(10, graphic)</div><div class=""> plotJ=new(10, graphic)</div><div class=""> plotS=new(10, graphic)</div><div class=""> </div><div class=""><br class=""></div><div class=""><div class=""> res = True</div><div class=""> res@gsnMaximize = False ; Maximize in frame</div><div class=""> res@gsnDraw = False ; Don't draw plots</div><div class=""> res@gsnFrame = False ; Don't advance frame</div><div class=""> res@cnFillOn = True ; Turn on contour fill</div><div class=""> res@cnInfoLabelOn = False ; Turn off info label</div><div class=""> res@cnLineLabelsOn = False ; Turn off line labels</div><div class=""> res@cnLinesOn = False ; Turn off contour lines</div><div class=""> res@cnLevelSelectionMode = "ExplicitLevels"</div><div class=""> res@lbLabelBarOn = False</div><div class=""> res@gsnAddCyclic = False</div><div class=""><br class=""></div><div class=""> res@mpMinLatF = min(lat)</div><div class=""> res@mpMaxLatF = max(lat)</div><div class=""> res@mpMinLonF = min(lon)</div><div class=""> res@mpMaxLonF = max(lon)</div></div><div class=""><br class=""></div><div class=""> </div><div class=""> :get the values</div><div class=""><div class=""> do i = 0,nplots-1 ;nplots =10</div><div class=""><br class=""></div><div class=""> cwtM = systemfunc("ls " + dirM2(i) + "freq*nc")</div><div class=""> do k = 0,3 ;loop seasons</div><div class=""><br class=""></div><div class=""> fileM = addfile(cwtM(k), "r")</div><div class=""> names = getfilevarnames(fileM)</div><div class=""> model = fileM->$names(j+3)$(0,:,:)</div><div class=""> ;print(names(j))</div><div class=""> ;print(max(model))</div><div class=""><br class=""></div><div class=""> if(k.eq.0) then ; plotting seasons</div><div class=""> plotD(i)= gsn_csm_contour_map(wks,model,res)</div><div class=""> else if(k.eq.1) then</div><div class=""> plotJ(i)= gsn_csm_contour_map(wks,model,res)</div><div class=""> else if(k.eq.2) then</div><div class=""> plotM(i)= gsn_csm_contour_map(wks,model,res)</div><div class=""> else if(k.eq.3) then</div><div class=""> plotS(i)= gsn_csm_contour_map(wks,model,res)</div><div class=""> end if</div><div class=""> end if</div><div class=""> end if</div><div class=""> end if</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""> end do</div><div class=""> end do</div></div><div class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class=""> attach_id1 = gsn_attach_plots(plotD,plotM,True,True)<br class=""></div><div class=""><br class=""></div><div class="">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 class="">I'd really appreciate any suggestion ,</div><div class=""><br class=""></div><div class="">many thanks</div><div class=""><br class=""></div><div class="">Noelia</div><div class=""><br class=""></div></div>
_______________________________________________<br class="">ncl-talk mailing list<br class=""><a href="mailto:ncl-talk@ucar.edu" class="">ncl-talk@ucar.edu</a><br class="">List instructions, subscriber options, unsubscribe:<br class="">http://mailman.ucar.edu/mailman/listinfo/ncl-talk<br class=""></div></blockquote></div><br class=""></div></body></html>