Re: Y limits on XY plots

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Tue, 14 Mar 2006 06:30:25 -0700 (MST)

> I am busy doing a plot similar to that in example xy_5.ncl. I was just
> wondering if there was a way to automatically center the reference line
> (located at Y=0) without explicitly specifying the trYminF and trYmaxF
> values.

Umm, not that I am aware of ...

but "symmetric" y limit could be calculated ... untested

   ymnmx = max( (/fabs(min(y)), fabs(max(y))/) ) ; larger of two values
   trYminF = -ymnmx
   trYmaxF = ymnmx

  ; nicer, perhaps .... normally used for contours but ok for xy
  ; http://www.ncl.ucar.edu/Document/Functions/Built-in/nice_mnmxintvl.shtm

   mnmxint = nice_mnmxintvl( -ymnmx, ymnmx, 14, False)

   trYminF = mnmxint(0)
   trYmaxF = mnmxint(1)

good luck
D
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Mar 14 2006 - 06:30:25 MST

This archive was generated by hypermail 2.2.0 : Tue Mar 14 2006 - 08:36:41 MST