Re: Changing legend location and plot size

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Fri Apr 23 2010 - 08:50:42 MDT

Hi Wee-Beng,

You are setting legend resources, but this is a labelbar that you are
trying to move.

Try setting

  vcres@lbOrientation = "Vertical"

For the shape of the plot, since you are not overlaying the vectors
on a map, the "mp" resource will have no effect.

You should just be able to set vpWidthF and vpHeightF to get the
shape you want, but the values need to be between 0.0 and 1.0. You
can also
set vcres@gsnMaximize = True which will maximize your plot in the
frame and preserve the aspect ratio.

So, if you want the plot to be twice as wide as it is high, try:

    vcres@gsnMaximize = True
   vcres@vpWidthF = 0.8
   vcres@vpHeightF = 0.4

--Mary

On Apr 23, 2010, at 3:43 AM, Wee-Beng Tay wrote:

> Hi,
>
> I have attached 2 copies of my plots. I have used
> gsn_csm_vector_scalar(wks,u,v,t,vcres) and gsn_add_polygon
> (wks,plot,x_cir,y_cir,gres) to create the plot. I have 2 problems.
>
> 1. My color legend is now at the bottom. How can I move it to the
> right side of the plot. I tried using :
>
> vcres@pmLegendDisplayMode = "Always" ; turn on legend
> vcres@pmLegendSide = "Right"
>
> However it can't work.
>
> 2. I tried to change the aspect ratio of my plot since the circle
> looks like an ellipse. I would like to change the delta x and y on
> the plot to be equal. I tried using:
>
> vcres@mpShapeMode = "FreeAspect"
> vcres@vpWidthF = 1.
> vcres@vpHeightF = 1.5
>
> It worked but the legend below is now cramped together.
>
> Hope you can help.
>
> Thanks again.
>
> <vector_color.png><vector_color_ILE2D.png>
> _______________________________________________
> 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 Fri Apr 23 08:51:19 2010

This archive was generated by hypermail 2.1.8 : Fri Apr 23 2010 - 14:40:07 MDT