Question

I am plotting a scatter-plot, using Clojure and Incanter. I need to control the size of the points in the graph/plot.

This is the basic code that I have. I am using a different domain and range for my data, but the question is the same. This plots without errors.

(doto (scatter-plot (range 10) (range 10))
      (set-stroke-color java.awt.Color/blue)
      view)

But, what would be the code to modify the size of the points being plotted? I have attempted the line:

(set-point-size :point-size 1)

but when I try to compile, I get the following error:

Exception in thread "main" java.lang.IllegalArgumentException: No value supplied for key: 1

I have a feeling that :point-size is the incorrect term.

Was it helpful?

Solution

Yes, just delete :point-size, i.e. use (set-point-size my-chart 1), or:

(doto (scatter-plot (range 10) (range 10))
      (set-stroke-color java.awt.Color/blue)
      (set-point-size 1)
      view)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top