andrewnc
andrewnc

Reputation: 105

Scatter plot in J

How do you create a scatter plot in J?

I can see how to easily create a line plot.

load 'plot'
plot i. 10

I have a hunch it has something to do with the jzplot class and the pd verb, but after scouring the documentation, I haven't found anything yet.

Upvotes: 1

Views: 121

Answers (2)

Geonardus
Geonardus

Reputation: 21

Even (a bit) easier:

load 'plot'
'pensize 5;type point' plot p:i.10

Upvotes: 1

andrewnc
andrewnc

Reputation: 105

It turns out my hunch was correct.

load 'plot'
plt_val =: 3 : 0
pd 'reset'
pd 'pensize 5;type point'
pd <y
pd 'show'
)

plt_val p: i. 10

You can do a scatter plot of the first 10 primes.

The type point is the critical piece

Upvotes: 1

Related Questions