Re: use gsn_polymarker for multiplot

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Thu Feb 28 2013 - 15:03:36 MST

Take a look at the docs for the resources gsnPanelXWhiteSpacePercent and gsnPanelYWhiteSpacePercent. You might want also to look at:
http://www.ncl.ucar.edu/Applications/panel.shtml.
It can get a bit tricky when if you have plots that are different sizes.
 -dave

On Feb 28, 2013, at 2:55 PM, juki juki wrote:

>
> Hi rick,
>
> Thank you, it works now. How is about controlling the distance between the plot or remove white space between the plot ?
>
> Jouky
>
>
> From: Rick Brownrigg <brownrig@ucar.edu>
> To: juki juki <juky_emc2@yahoo.com>
> Cc: NCL Talk <ncl-talk@ucar.edu>
> Sent: Friday, March 1, 2013 6:23 AM
> Subject: Re: use gsn_polymarker for multiplot
>
> Hi,
>
> I think you may need to use gsn_add_polymarker() for the purpose of paneling (?) Its use is slightly different -- see the docs.
>
> Rick
>
> On Feb 28, 2013, at 2:09 PM, juki juki <juky_emc2@yahoo.com> wrote:
>
>> Hi all ncl user !
>>
>> Again, I would like to hope your suggestion to overcome my ncl problem. I would like to make a multiplot by using gsn_panel, and each plot is marked by several symbols by using gsn_polymarker. For single plot, everything is fine in which the marker is visible, but for multiplot the markers disappear. The following is the example of the code:
>>
>>
>>
>> res = True
>> res@gsnFrame = False
>> res@cnFillOn = True
>> res@cnLinesOn = False
>> res@gsnDraw = False ; don't draw
>> res@gsnFrame = False ; don't advance frame
>> res@cnInfoLabelOn = False ; turn off cn info label
>> res@lbLabelBarOn = False ; turn off individual cb's
>> res@trGridType = "TriangularMesh"
>> res@gsnSpreadColors = True
>> res@gsnSpreadColorEnd = 90
>>
>> res@sfXArray = x
>> res@sfYArray = y
>>
>> res@trYMaxF = 40.
>> res@trXMaxF = 40.
>> res@trYMinF = -40.
>> res@trXMinF = -40.
>>
>> res@cnLevelSelectionMode = "ManualLevels"
>> res@cnMinLevelValF = 0.0
>> res@cnMaxLevelValF = 2
>> res@cnLevelSpacingF = 0.1
>>
>> res@tmXBLabelFontHeightF = 0.05 ; resize tick labels
>> res@tmYLLabelFontHeightF = 0.05
>>
>> ;---This resource defaults to True in NCL V6.1.0
>> res@lbLabelAutoStride = True
>> res@lbBoxLinesOn = False
>> ; res@tiMainString = "Test1"
>>
>> ;*****************************************
>> ; poly marker
>> ;*****************************************
>> polyres = True ; poly marker mods desired
>> polyres@gsMarkerIndex = 5 ; choose polymarker
>> polyres@gsMarkerSizeF = 10 ; select size to avoid streaking
>> polyres@gsMarkerColor = (/"black"/) ; choose color
>>
>> polyres1 = True ; poly marker mods desired
>> polyres1@gsMarkerIndex = 7 ; choose polymarker
>> polyres1@gsMarkerSizeF = 10 ; select size to avoid streaking
>> polyres1@gsMarkerColor = (/"black"/) ; choose color
>>
>>
>> plot(0) = gsn_csm_contour(wks,data1,res) ; contour the variable
>> gsn_polymarker(wks,plot(0),0,0,polyres) ; draw polymarkers
>> gsn_polymarker(wks,plot(0),-35,33,polyres1) ; draw polymarkers
>>
>> plot(1) = gsn_csm_contour(wks,data2,res) ; contour the variable
>> gsn_polymarker(wks,plot(1),0,0,polyres) ; draw polymarkers
>> gsn_polymarker(wks,plot(1),-35,33,polyres1) ; draw polymarkers
>> plot(2) = gsn_csm_contour(wks,data3,res) ; contour the variable
>> gsn_polymarker(wks,plot(2),0,0,polyres) ; draw polymarkers
>> gsn_polymarker(wks,plot(2),-35,33,polyres1) ; draw polymarkers
>> plot(3) = gsn_csm_contour(wks,data4,res) ; contour the variable
>> gsn_polymarker(wks,plot(3),0,0,polyres) ; draw polymarkers
>> gsn_polymarker(wks,plot(3),-35,33,polyres1) ; draw polymarkers
>>
>>
>> ;************************************************
>> ; create panel
>> ;************************************************
>> resP = True ; modify the panel plot
>> resP@txString = "test"
>> resP@gsnPanelLabelBar = True ; add common colorbar
>> resP@lbLabelFontHeightF = 0.007 ; make labels smaller
>> gsn_panel(wks,plot,(/2,2/),resP) ; now draw as one plot
>>
>> draw(wks)
>> frame(wks)
>>
>>
>> Another question is how to set the distance between each plot ? Is it possible to remove the white space between the plot ? Thanks very much for best help.
>>
>>
>> Joeuky
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Feb 28 15:03:46 2013

This archive was generated by hypermail 2.1.8 : Fri Mar 01 2013 - 10:41:03 MST