---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