Also I wrote my first function using &
(,A)-:,j.A
0
0
0
f=: ;&,.
(,A) f ,j.A
┌─────┬───────┐
│ _2│ 0j_2│
│ _2│ 0j_2│
│_1.75│0j_1.75│
│_1.75│0j_1.75│
│ _1.5│ 0j_1.5│
│ _1.5│ 0j_1.5│
│_1.25│0j_1.25│
│_1.25│0j_1.25│
│ _1│ 0j_1│
│ _1│ 0j_1│
│_0.75│0j_0.75│
│_0.75│0j_0.75│
│ _0.5│ 0j_0.5│
│ _0.5│ 0j_0.5│
│_0.25│0j_0.25│
│_0.25│0j_0.25│
│ 0│ 0│
│ 0│ 0│
│ 0.25│ 0j0.25│
│ 0.25│ 0j0.25│
│ 0.5│ 0j0.5│
│ 0.5│ 0j0.5│
│ 0.75│ 0j0.75│
│ 0.75│ 0j0.75│
│ 1│ 0j1│
│ 1│ 0j1│
│ 1.25│ 0j1.25│
│ 1.25│ 0j1.25│
│ 1.5│ 0j1.5│
│ 1.5│ 0j1.5│
│ 1.75│ 0j1.75│
│ 1.75│ 0j1.75│
│ 2│ 0j2│
│ 2│ 0j2│
└─────┴───────┘
Probably there is an easier way to make this array.
Linda
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Linda Alvord
Sent: Saturday, April 19, 2014 9:14 AM
To: [email protected]
Subject: Re: [Jprogramming] A simple plot
Sometimes typing errors are fun! I got an accordion.
plot 4%~(,j.)A=:_8 8 j./~ i: 8
plot 4%~,j.A
Pull the graph down and up vertically to see the accordion.
Linda
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Linda Alvord
Sent: Saturday, April 19, 2014 8:23 AM
To: [email protected]
Subject: Re: [Jprogramming] A simple plot
That's nice! Thanks
Linda
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Bo Jacoby
Sent: Saturday, April 19, 2014 3:14 AM
To: [email protected]
Subject: Re: [Jprogramming] A simple plot
Try this:
plot 4%~(,j.)_8 8 j./~ i: 8
Den 4:26 lørdag den 19. april 2014 skrev Linda Alvord <[email protected]>:
I would like to create ¼” graph paper with both scales from _2 to 2 . I
>can’t get vertical lines.
>
>
>
>Here are two horizontal lines:
>
>
>
>load ‘plot’
>
>Plot 2 2$2 2 _2 _2
>
>
>
>NB. I got the horizontal lines, but would like them all the same color.
>
>
>
>plot A=:0.25*17 2$2#i:8
>
>
>
>NB.Then I got both scales correct:
>
>
>
>plot A;A
>
>
>
>NB. But that is a polar plot that needs grid lines.
>
>
>
>NB. I’m not sure what this is:
>
>
>
>plot ] A=:(20 2$2#i:10)(,"1)5
>
>
>
>If you copy the script into a temp file, you must run each plot a line at a
>time as they will otherwise be superimposed on one another.
>
>I use prt screen and pasted in the plots but the e-mail wasn’t sent.
>
>
>
>
>
>Linda
>
>
>
>
>
>
>
>----------------------------------------------------------------------
>For information about J forums see http://www.jsoftware.com/forums.htm
>
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm