If I understand correctly, you just want to plot 2 x 1-D data vectors as you say …
eg if data=: i.30, maybe plot data^2 and data as 2 line plots … without specifying the x values. data=:i.30 plot (data^2),:data This plots with an integer x-axis (since not specified 0 … n being the number of points)… If you want to specify the x values for which the y values have been calculated, add a leading cell containing the x values, here I use 1000*data and you see the x-axis changed to this set of x values plot (1000*data);(data^2),:data The first cell is the x values (30 points but now set to 1000*i.30) The second cell contains the 2 sets of y values as a 2 row matrix with 30 points in each row, as before. Suggest you try executing the above commands to plot, then substitute for your values. HTH, Rob > On 6 Apr 2017, at 10:15 pm, Michael Goodrich <[email protected]> > wrote: > > I am trying to plot two 1-d data vectors in an overlay plot namely: > > plot 0 {"1 (50 1$^((-i.50)%10)),: 0 {"1 Y > > Y is a data vector s.t. > > $ Y > 50 1 > > > following the pattern: > > 'key sin(exp),cos(exp)' plot (;(sin,:cos)@:^) -: >: i:3j100 > > However is does not work: > > The problem seems to be in how to package the data for plot. try as I > might, I cant discern the problem from the plot examples or doc. > > Help would be appreciated! > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
