Not quite sure what you're trying to do, but would this be a step in the
right direction?

   load 'plot'

   do=: 13 :'({.y) +(i.>:{:y)*(--/ 2{.y)%{:y'

   G=:do _2 2 32

   P=: 2 <. *:

   plot (];P) G


In your version you have not specified x-coordinates, so it picks 0-32.

By using ] you specify the x-range


Also note that that you do not need "do", there is a plot builtin called
"steps":

   plot (];P) steps _2 2 32

would achieve the same result





On 25 April 2014 01:25, Linda Alvord <[email protected]> wrote:

> Can anyone help me put the parabola, P, on the graph paper without changing
> the scales of the graph paper.
>
>    load 'plot'
>    do=: 13 :'({.y) +(i.>:{:y)*(--/ 2{.y)%{:y'
>    A=:do _2 2 8
>    V=:j./~ A
>    H=:|:|. V
>    'pensize 2;color 50 255 255' plot H,V
>
>    f=:*:
>    'pensize 2;color BLUE' plot P=: 2 <. f do _2 2 32
>
> 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

Reply via email to