To abjure the load 'plot' c=: (0 1 2;3 4 5),:(0 1 2 3;4 5 6 7) vci=: ([: < [: <"1 [: |: >)"1 NB. vector of coordinates indices, for } ma=: 4 : 'a:[a=: x y}a' a=:8 8$'.' a[ 'x+' ma&> vci c
...x+... ....x+.. .....x+. .......+ ........ ........ ........ ........ >Ah, the graphics remind me of the reams of paper towards my 1970 undergraduate >thesis at the Cambridge Scientific Center ~greg https//picsrp.github.io -- from: Henry Rich <[email protected]> to: [email protected] date: Apr 15, 2021, 4:11 PM subject: Re: [Jprogramming] Help with colors in point plots, please >Why yes it does, thanks. It also works with boxes instead of complex values. I >didn't know that a sequence of pds changes the color. Henry Rich -- from: Devon McCormick <[email protected]> to: J-programming forum <[email protected]> date: Apr 15, 2021, 4:09 PM subject: Re: [Jprogramming] Help with colors in point plots, please Does this do what you want? pd 'reset' pd 'type point;pensize 8' pd 0 1 2 j. 3 4 5 pd 0 1 2 3 j. 4 5 6 7 pd 'show' -- from: Henry Rich <[email protected]> to: J-programming forum <[email protected]> date: Apr 15, 2021, 3:28 PM subject: [Jprogramming] Help with colors in point plots, please >I have an array A of boxes, shape (N,2). >Each row of A is 2 boxes. The first box is x coordinates, the second is y >coordinates. >I want to plot the points in a point plot, with each row's points having a >different color. The ROWS do not have the same numbers of points. >I want to avoid a loop that would require me to specify the color of each >point set. Example: +-------+-------+ |0 1 2 |3 4 5 | (0,3), (1,4),(2,5) in (say) blue +-------+-------+ |0 1 2 3|4 5 6 7| (0,4),(1,5),(2,6),(3,7) in (say) red +-------+-------+ Can I do this? Henry Rich ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
