Re: problem with contour InfoLabel

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Tue, 26 Jun 2007 10:05:09 -0600 (MDT)

Hi Brian,

This looks like a bug, and I was able to see the same results from
the script you included (thanks for providing it).

As for a work-around, you might try setting the cnInfoLabelFormat
resource to a string that gets rid of the exponents. The default is
the cryptic string "*+^sg". If you remove the "s" part of this, you
get rid of the exponents:

   res = True
   res_at_cnInfoLabelFormat = "*+^g"

   plot = gsn_csm_contour(wks,u,res)

This casuses the information label to be:

    "CONTOUR FROM -8e10 to 8e10 by 2e10"

Let me know if this is not an acceptable work-around. Meanwhile, I'll
see about a fix.

--Mary

On Mon, 25 Jun 2007, Brian Medeiros wrote:

> Hi All,
>
> Using NCL v. 4.3.0, I am having a problem with the information label format
> on contour plots. When NCL decides to use scientific notation for the text,
> it isn't ending the superscript and is adding extra text ("10" in this
> example), so the rest of the line is as superscript. The problem is quite
> funny when there are lots of exponents, as the text gets tinier and tinier.
>
> Below is an example of the problem. The resultant info-label gives, in LaTeX
> terms, -8 \times 10^{10^{10} TO 8 \times 10^{10^{10} BY 2 \times
> 10^{10^{10}}}}, and the plot is attached as a pdf.
>
> ;;;;;;;;;
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
>
> mx = 31
> ny = 31
>
> u = random_normal(0.0, 3.0, (/ny,mx/))
> u = (/u*1e10/)
> u!0 = "y"
> u!1 = "x"
> u&x = ispan(0,mx-1,1)
> u&y = ispan(0,ny-1,1)
> u@_FillValue = -999.
>
> wks = gsn_open_wks("x11","infolabel")
>
> res = False
> plot = gsn_csm_contour(wks,u,res)
> ;;;;;;;;;;;
>
> Can someone confirm this behavior and/or suggest a fix for it?
>
> thanks,
>
> .brian
>
>
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Jun 26 2007 - 10:05:09 MDT

This archive was generated by hypermail 2.2.0 : Wed Jun 27 2007 - 09:47:23 MDT