Hi Xiaoming,
In the future please include your script or your resource list when
asking questions about NCL graphics. It makes it easier for us to
diagnose the problem...
Anyway, in this case, your labels/legend are being drawn partially
outside the viewport. You can set the viewport resources to position
where the plot appears in the viewport. You set the viewport resources
in NDC units, which range from 0->1:
res_at_vpXF = 0.2 ; where left side of plot starts
res_at_vpWidthF = 0.6 ; starting from vpXF, continue on 0.6 NDC units
; Plot will run from 0.2 to 0.8 NDC units
; in the x-direction
res_at_vpYF = 0.8 ; where top of plot starts
res_at_vpHeightF = 0.6 ; starting from vpYF, continue on 0.6 NDC units
; Plot will run from 0.8->0.2 NDC units in the
; y-direction
The above settings will center your plot on the page, and should leave
room for the tiYAxisString and legend. Note that vpXF and vpYF set where
the plot border starts, and not where the tickmark labels or axis labels
start.
You can set the relative position of the legend using pmLegendSide as
you are doing, but you can further move the legend any way you wish by
using the pmLegendOrthogonalPosD and pmLegendParallelPosF resources:
http://www.ncl.ucar.edu/Document/Graphics/Resources/pm.shtml#pmLegendSide
http://www.ncl.ucar.edu/Document/Graphics/Resources/pm.shtml#pmLegendOrthogonalPosF
http://www.ncl.ucar.edu/Document/Graphics/Resources/pm.shtml#pmLegendParallelPosF
Good luck,
Adam
Xiaoming Hu wrote:
> Dear all
>
> I attached the figure made by me.
>
> You may notice that the legend is truncated
>
> Also the tiYAxisString is also truncated since I have the resource as
> below:
> res_at_tiYAxisString ="rate coefficient, cm:S:3:N:molec.:S:-1:N:s:S:-1"
>
> How to avoid this?
>
> Also about the position of the legend, do we have more choices other
> than top, bottom,right and left? In matlab we have others like upright
> conner, something like that, which is convenient.
>
> Thanks very much
>
> Xiaoming
>
> ------------------------------------------------------------------------
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
-- -------------------------------------------------------------- Adam Phillips asphilli_at_ucar.edu National Center for Atmospheric Research tel: (303) 497-1726 ESSL/CGD/CAS fax: (303) 497-1333 P.O. Box 3000 Boulder, CO 80307-3000 http://www.cgd.ucar.edu/cas/asphilli _______________________________________________ ncl-talk mailing list ncl-talk_at_ucar.edu http://mailman.ucar.edu/mailman/listinfo/ncl-talkReceived on Tue Feb 13 2007 - 12:00:41 MST
This archive was generated by hypermail 2.2.0 : Tue Feb 13 2007 - 14:07:37 MST