[Thread Prev][Thread Next][Index]

Re: [ferret_users] remove zero from x-axis



Hi Steve,
           Ok. If i understood your question properly, here are few
more ideas....

1. two viewports joined together
----------------------------------
All lines are important including the ppl commands and "/hlim" &
"/axes" qualifiers to fill commad. Levels should be same for both
fill command. You have to run this example (i mean jnl file) at
least twice in the same Ferret session to get things properly.

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

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

  define view/axes/xlim=0.1:0.5/ylim=0.12:0.88 vl
  define view/axes/xlim=0.5:0.9/ylim=0.12:0.88 vr

  PPL AXNMTC 1,1
  PPL AXLINT 1,1
  set view vl
    fill/set/hlim=-6:-0.5:1/axes=1,1,1,0/nokey/nolab/lev=(-2,2,0.5) var
      ppl xfor (f4.1)
    ppl fill

  PPL AXLINT 1,0  ! need to set Y-AXLINT to zero
  set view vr
    fill/set/hlim=0.5:6:1/axes=1,1,0,1/nolab/lev=(-2,2,0.5) var
      ppl xfor (f4.1)
    ppl fill

2) No data over Zero 
--------------------
If your X axis does not have a "0" point, masking bussiness may be
difficult. Here you can use some combination of "set reg"  and 
"/HLIMITS"...see below. LEVELS and HLIMITS should be same for both
the fill command.

  cancel reg/all  ! keep it here

  let xpts = XSEQUENCE({-6,-5,-4,-3,-2,-1,1,2,3,4,5,6})
  def axis/x/from_data xax=xpts
  def axis/y=50:1000:50 yax

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

  set reg/x=-6:-1 
  fill/set/hlim=-6:6:1/lev=(-2,2,0.5) var
     ppl xfor (f4.1)
  ppl fill

  set reg/x=1:6 
  fill/set/hlim=-6:6:1/nolab/nokey/lev=(-2,2,0.5) var
     ppl xfor (f4.1)
  ppl fill/over

Hope this helps,

Jaison




On Thu, 12 Oct 2006 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