[ncl-talk] text res

Mary Haley haley at ucar.edu
Tue Oct 13 13:04:05 MDT 2015


Geeta,

I'm not sure what you mean by "messy".

You are setting txPosXF and txPosYF, but these resources are meaningless,
because the "gsn_add_text" function has the X and Y positions as part of
its argument list, in your case, the "lon" and "lat" arguments:

  text  = gsn_add_text(wks,plot,sprintf("%9.4g",rf),lon,lat,txres)

So, you should be trying to change your lon and lat values, and not txPosXF
and txPosYF.

If by "messy" you mean that the text string is touching the markers in a
couple of places, then there are several things you can do.

One is to simply add some extra spaces before the text strings. You can do
this by changing the format in the "sprintf" call to have more fields:

  text  = gsn_add_text(wks,plot,sprintf("%11.4g",rf),lon,lat,txres)

or by adding a space:

  text  = gsn_add_text(wks,plot,"  " + sprintf("%9.4g",rf),lon,lat,txres)

You can also add a small delta value to the "lon" position:

  text  = gsn_add_text(wks,plot,sprintf("%9.4g",rf),lon+0.1,lat,txres)

--Mary






On Mon, Oct 12, 2015 at 11:14 AM, Geeta Geeta <geetag54 at yahoo.com> wrote:

> Hi.
> I am plotting station rainfall and my data looks like
> 13.57   77.38   919.6  5.6
> 12.3    78.18   882.2  67.
> 13.06   77.24   900    0.1
> 13.06   77.24   900    0.1
> ~
> The Rf is in the 4th Col and it gets plotted. But when I try to change the
> position of the text, I am unable to do it.
> My script is attached and the Figure.
>
> essentially,
>
>   txres at txPosXF            = 0.775
>   txres at txPosYF            = -5.05
> ;  txres at txAngleF           = 40.00
>
> Since I am unable to change the above two, my plot looks a little messy.
>
> can someone suggest???
>
> Geeta.
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20151013/79e2b99e/attachment.html 


More information about the ncl-talk mailing list