Re: gsn_text_ndc on the figure foreground

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Thu, 29 Jan 2009 07:42:24 -0700

Michel,

The problem is that you are drawing the labels first, and then the map
second, so this obscures your labels. You can draw them after you do
the paneling, but then your NDC coordinates are going to be different,
and I imagine you went through some effort to get these values just
right.

However, if you are just trying to mark the high and low contours on
the plot, you can do this with contour resources:

  res_at_cnHighLabelsOn = True
  res_at_cnLowLabelsOn = True

There are a number of cnHigh* and cnLow* resources for configuring the
look of the labels.

If this doesn't work, and you want to stick with the gsn_text method,
then, since you are adding labels on the plot itself, I would use
gsn_add_text. You can then use plot coordinates instead of NDC
coordinates, which hopefully is easier. gsn_add_text attaches the
text to the plot, so when you panel the plots, the text will get drawn
automatically, and it should get drawn on top of the plots.

--Mary

On Jan 29, 2009, at 7:22 AM, Michel dos Santos Mesquita wrote:

> Hi everyone,
>
> I have created a panel plot (4 figures, 2x2) showing MSLP data for
> different days. I now want to add the words 'L' and 'H' to some of the
> lows and highs on the plot. I have done that using gsn_text_ndc.
> The gsn_text_ndc works perfectly, except that over the continents
> (gray
> color) it draws the words 'L' or 'H' under the map, in the background.
> This makes it impossible to see the words. Over the ocean there is no
> problem because it is 'transparent' on the plot.
> How can I bring the text from gsn_text_ndc to the foreground?
> Here are the last lines of my script:
>
> ;************************************************
> ; Draw text on plot using NDC coordinates
> ;************************************************
> txres = True
> txres_at_txFontHeightF = 0.01
>
> ; First figure (panel)
> gsn_text_ndc(wks,"L",0.1,0.6,txres)
> gsn_text_ndc(wks,"H",0.26,0.58,txres)
> ; Second figure (panel)
> gsn_text_ndc(wks,"L",0.71,0.64,txres)
> gsn_text_ndc(wks,"H",0.79,0.57,txres)
> ; Third figure (panel)
> gsn_text_ndc(wks,"L",0.30,0.43,txres)
> gsn_text_ndc(wks,"H",0.31,0.34,txres)
> ; Fourth figure (panel)
> gsn_text_ndc(wks,"L",0.81,0.45,txres)
> gsn_text_ndc(wks,"H",0.81,0.33,txres)
>
>
> ;*******************************************
> ; draw panel plot
> ;*******************************************
> resP = True
> resP_at_gsnPanelFigureStrings = (/"a)","b)","c)","d)"/)
>
> gsn_panel(wks,plot,(/2,2/),resP) ; create panel plot
>
> I thank you in advance!
>
> Kindest regards,
>
> Michel
> --
> Michel Mesquita
> PhD Student
> UAF/IARC
> michel_at_iarc.uaf.edu
>
>
> -----------------------------------------
> This email was sent using SquirrelMail.
> "Webmail for nuts!"
> http://squirrelmail.org/
>
> _______________________________________________
> 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 Jan 29 2009 - 07:42:24 MST

This archive was generated by hypermail 2.2.0 : Thu Jan 29 2009 - 16:23:44 MST