[Thread Prev][Thread Next][Index]

Re: [ferret_users] aline



Hi all -

While the method below works for overlaying lines, a confusion is that when a time axis is used, the "user units" that are used to place labels are not the same "user units" as the ones used to plot variables. The reason my definition of "tt" below works is because in this case t is measured in days from T0 of the time axis, which is how Ferret plots. But the units used to plot labels on a time axis are, in general, completely different. In my case:

yes? sho axis tmonth
name axis # pts start end
TMONTH TIME 132 r 16-JAN-1992 05:10 15-DEC-2002 18:49
T0 = 15-JAN-1901 00:00:00
Axis span (to cell edges) = 4017

yes? ppl list taxis

TAXIS QUALITIES
LO= 8.76E+03 DT= 6.00E+01 CSIZE= 1.00E-01 TYPE= TAXIS3 VANG= 0.00E+00
TOP AXIS= ON BOTTOM AXIS= ON
TMIN=19920101000000 0:00 JAN 1,1992
TMAX=20030101000000 0:00 JAN 1,2003
TSTART=19910101000000 0:00 JAN 1,1991
NMTC= -1 LABEL= -3 IFDB= 3 ISDB= 1 TAXIS= OFF IAUTOT= ON

For label purposes, TSTART is 1-jan-1991, and time is measured in hours (DT= 6.00E+01 as above, where the base unit is minutes for long- ago historical reasons). TSTART is recomputed every time a plot is made, based on the limits chosen. However for the time axis (and for plots), time is measured in days relative to 15-Jan-1901 (these are given by the definition of the variable's time axis tmonth). (For those of a technical mindset, note that in the definition of tmonth, 4017/132=30.43..., which is the number of days in an average month). My definition of tt in the example below gives time in units of the variable (i.e. of the axis tmonth), and cannot be used to choose the position of a label.

This difference is confusing and unfortunate. I believe it is the cause of Emilie's difficulties.

Billy

On Oct 8, 2006, at 8:50 PM, William S. Kessler wrote:

Hi Emilie -

Yes, a time axis is a little more complicated, but the method still works.

Suppose I make a plot of a variable u, on a time axis, and want to draw a line connecting 2 specific points:

let tt=t[gt=u] ! first define a variable with the values of the time axis points
plot/vs/over/nolab/line=2 {`tt[t=1-jul-1993]`,`tt[t=13-sep-1997]`}, {-.12,-.08}

Billy

On Oct 7, 2006, at 2:37 AM, Emilie Vanvyve wrote:

Hi Ansley and Billy,

I finally could do it with the ALINE command and never understood why it wasn't working initially.
Thanks for the trick with PLOT and LET, I knew the one with PLOT, tried it but couldn't make it work.
My plot is time series. I got the abscisse max and min values with PPL LISTSYM but never could get a line appearing. I don't understand why since the same values used with LABEL/user worked perfectly.

Cheers,

Emilie



_______________________________________________________________

Emilie VANVYVE —— Physicist, PhD student

Université catholique de Louvain (UCL)
Institut d'astronomie et de géophysique Georges Lemaître (ASTR)
Chemin du Cyclotron, 2, 1348 Louvain-la-Neuve, Belgium

Phone: +32 (0)10 473338 & Fax: +32 (0)10 474722
E-mail: vanvyve@astr.ucl.ac.be (www.astr.ucl.ac.be/u/vanvyve)
_______________________________________________________________



On 6 Oct 2006, at 21:54, Ansley Manke wrote:

Hi Billy, Emilie
I quite agree. ALINE is often more trouble than it's worth. I've added some text to the description of ALINE in the Users Guide. Note that one can use PLOT/VS/LINE and specify the line color and thickness directly with /COLOR= and /THICK= (and as Billy notes, all the qualifiers of the PLOT command, such as /DASH specifiers)

Try this example
yes? ! Draw a plot
yes? plot/line/sym=22/i=1:5 i-3

yes? ! PUt a label inside the plot window at (3,-2) and
yes? ! draw a line from (3,2) to (2,-1)

yes? label 3,-2,-1,0,0.2 "here is the point (2,-1)"
yes? plot/vs/line/over/nolab/color=red/thick {3,2}, {-2,-1}

yes? ! Make a label outside the plot window at (3,3) and
yes? ! draw a line from (3,3) to (4,1)

yes? label 3,3,-1,0,0.2 "here is the point (4,1)"
yes? plot/vs/line/over/nolab/color=blue/thick/set {3,4}, {3,1}
yes? ppl window,off
yes? ppl plot/over

William S. Kessler wrote:
Hi Emilie -

I have stopped using ALINE as it is often flaky. You can achieve the same effect with less bother and much more flexibility by defining your endpoints with LET:

let xpts={4,8}; let ypts={-3,0}
plot/vs/over/nolab/line=N/dash=(...)/col= ... xpts,ypts

If you want the line to go outside the plot box:

plot/vs/over/set/....
ppl window,off
ppl plot/over

Billy K

On Oct 6, 2006, at 6:26 AM, Emilie Vanvyve wrote:

Just for info, I eventually found how to do: use "ppl line 1,,0", cfr PPLUS guide for details.

Emilie


On 6 Oct 2006, at 13:23, Emilie Vanvyve wrote:

Hi everyone,

On a time series of a variable (made with PLOT), the command PPLUS ALINE 1,x1,y1,x2,y2" persists to draw a dashed black line instead of a solid black line.
Does anybody know how to prevent that behaviour? I thought solid was the default case.

Many thanks,

Emilie





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
William S. Kessler
NOAA / Pacific Marine Environmental Laboratory
7600 Sand Point Way NE
Seattle WA 98115 USA

william.s.kessler@noaa.gov
Tel: 206-526-6221
Fax: 206-526-6744
Home page: http://www.pmel.noaa.gov/people/kessler/


-- ~> ~> ~> ~> ~> ~> ~> ~> ~> ~> ~> Ansley Manke, NOAA/PMEL ansley.b.manke@noaa.gov 7600 Sand Point Way NE, Seattle WA Phone 206-526-6246, FAX 206-526-6744

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
William S. Kessler
NOAA / Pacific Marine Environmental Laboratory
7600 Sand Point Way NE
Seattle WA 98115 USA

william.s.kessler@noaa.gov
Tel: 206-526-6221
Fax: 206-526-6744
Home page: http://www.pmel.noaa.gov/people/kessler/



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
William S. Kessler
NOAA / Pacific Marine Environmental Laboratory
7600 Sand Point Way NE
Seattle WA 98115 USA

william.s.kessler@noaa.gov
Tel: 206-526-6221
Fax: 206-526-6744
Home page: http://www.pmel.noaa.gov/people/kessler/




[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement