[Thread Prev][Thread Next][Index]

Re: [ferret_users] remove zero from x-axis



Hi Steve,
To extend Jaison's removal of the 0.0 label, what you probable need is to "white out" the portion of the plot which represents linear interpolation between the values at -1 and +1.
Here is a simple way to do that:

def axis/x xax={-6,-5,-4,-3,-2,-1,1,2,3,4,5,6}
def axis/y=50:1000:50 yax
let var =sin(x[gx=xax]) + sin(y[gy=yax])
fill/set var ; ppl xfor (f4.1) ; ppl fill
poly/o/nolab/pal=white {-0.5,0.5,0.5,-0.5},{50,50,1000,1000}

A less easy, though more "correct", way would be to define the x-axis with edges that correctly define the range about x=+1 to which the value there applies. My demo in the last line assumes the lower edge is at 0.5 (and -0.5 for the upper edge for the value at x=-1).

Good luck,
Mick
-----------------------------------------
guimond@coaps.fsu.edu wrote:
Hi Jaison,
Thank you for your suggestion. This procedure basically "whites out" the 0.0, which is good but not ideally what I was looking for. There is a large gap between -1 and 1 where the "0.0" used to be and that may be interpreted wrongly when someone looks at the graph. It looks like 0.0 has values associated with it, when in reality it does not exist on my axis. I may just assign missing values to 0.0, so there is a line of white above 0.0. Any other suggestions?

Steve



Quoting Jaison Kurian <jaison@caos.iisc.ernet.in>:

Hi Steve,
         A weird solution to your problem...make a label
"0.0" exactly at the postion of X axis 0 in the background
color ! Here is an example..

For the default plot, the background color is white. So
define a new "ppl color" with values "99,99,99" (which
is better than using "100,100,100" with most of the file
formats)

 def axis/x xax={-6,-5,-4,-3,-2,-1,1,2,3,4,5,6}
 def axis/y=50:1000:50 yax

 let var =sin(x[gx=xax]) + sin(y[gy=yax])

 fill/set var
   ppl xfor (f4.1)
 ppl fill
 ppl color 6,99,99,99
 label 0,0,0,0,0.10,@C0060.0  ! no space between "@C006" and "0.0"

You may have to tune the "Y" value for label to get it at right
position.

Hope this helps,

Jaison


On Wed, 11 Oct 2006 guimond@coaps.fsu.edu wrote:

Hi Ferreters,
  I defined an xaxis like so:

def axis/x xax={-6,-5,-4,-3,-2,-1,1,2,3,4,5,6}

When I go to plot my data, "0" still shows up on the xaxis which I
would like to remove.  Any ideas?

Thanks Much,
Steve

=======================================================
Stephen R. Guimond
Graduate Research Assistant
Center for Ocean-Atmospheric Prediction Studies (COAPS)
Tallahassee, FL 32304
=======================================================


----------------------------------------------------------------





----------------------------------------------------------------








[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement