This opens a possibility to create a high-level
automatic date/time adaptive axis.
Adaptive because given any date/time range it
takes the two adjacent units that fit nicely
between start and stop. E.g.
06-Sep 06-Nov 07-Jan 07-Mar 07-May
16:00 16:20 16:40 17:00 17:20
Given total range start and stop it is then very
easy to guess what these pairs mean, yet it is
a very compact notation.
> From: "Sherlock, Ric" <[EMAIL PROTECTED]>
>
> ---Brian Schott wrote:
> > I think you are referring to the plot demo in the
> > menu Styles|Style2 . If so, then the key to understanding
> > the mth is to understand the corresponding line which
> > follows. In this line steps 0 15 5 produces 6 values which
> > correspond to the 6 values of mth: 0 3 6 9 12 15
> >
> >
> > pd 'xticpos ',":steps 0 15 5
>
> Studying this example provided me with an "aha!" moment. In case the
> following
> helps others (or me next time I want to do this and have forgotten!) ...
>
> When you plot one or more series, without explicitly providing the x values,
> then J assumes the x values are i.{:$y .
>
> g=: 158 156 156 147 148 149 144 138 134 129 129 132
> plot g
>
> If you want to provide x-labels for each of those x values then you can just
> specify the xlabel option with ({:$y) labels formatted as a space-delimited
> string.
>
> 'xlabel Jun July Aug Sept Oct Nov Dec Jan Feb Mar Apr May' plot g
>
> Enclose any labels containing spaces in double quotes.
>
> 'xlabel "Jun 01" July Aug Sept Oct Nov Dec Jan Feb Mar Apr May' plot g
>
> If however you wish to only specify x-labels for some of the x values then
> you
> can use the xticpos option to specify which of the x values (i.{:$y) should
> be
> labelled.
>
> 'xlabel Jun Sept Dec Mar; xticpos 0 3 6 9' plot g
> 'xlabel Jun July Nov Dec Apr May; xticpos 0 1 5 6 10 11' plot g
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm