lab=. (":each d) ,each (m-1) { <"_1 MTH3
Henry Rich
On 11/27/2010 4:24 PM, PackRat wrote:
> I'm stumped again! Except for the j,m,d data values below, this date
> label code comes from some other J source code (the "2004 London Gold
> Fix USD" plot demo), and so, theoretically, it ought to work correctly,
> but the case below does not:
>
> -------------------------------------------------------------
> MTH3=. _3[\'JanFebMarAprMayJunJulAugSepOctNovDec'
> j=. 2008 2008 2008 2008 2008 2008 2008 2008 2008 2008 2008
> m=. 1 1 1 2 2 2 3 3 3 4 4
> d=. 1 2 3 1 2 3 1 2 3 1 2
> lab=. (":each d) ,each (m-1) { MTH3
> ...
> pd 'xlabel ',; ' ',each lab
> -------------------------------------------------------------
>
> I think lab is supposed to look like this:
>
> 1Jan
> 2Jan
> 3Jan
> 1Feb
> 2Feb
> ...
>
> Unfortunately, it looks like this:
>
> +--+--+--+
> |1J|1a|1n|
> +--+--+--+
> |2J|2a|2n|
> +--+--+--+
> |3J|3a|3n|
> +--+--+--+
> |1F|1e|1b|
> +--+--+--+
> |2F|2e|2b|
> +--+--+--+
> ...
>
> As I said, I got the critical code from an existing J source, and I
> can't quite figure out exactly what it's supposed to be doing or why
> it's doing what it's doing. I'm trying to get my whole (short) project
> going so that I can create charts of my blood glucose data for my
> doctor's appointment on Tuesday. (I've prepared charts previously, but
> not with date info along the bottom.) Any help would be appreciated!
> Thanks in advance!
>
> Harvey
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm