generateme / cljplot

JVM Clojure charting library
Eclipse Public License 2.0
152 stars 7 forks source link

how to change the background color of the plot? #5

Closed zcaudate closed 5 years ago

zcaudate commented 5 years ago

It's currently light grayish blue and I want to set it to white.

genmeblog commented 5 years ago

there is a rendering parameter :background.

(r/render-lattice {:width 400 :height 400 :background :white})

genmeblog commented 5 years ago

Just to note, background can be color or image.

Color can be a keyword from this list: https://clojure2d.github.io/clojure2d/docs/static/colors.html or ARGB integer: 0xffaabbcc or CSS string "#bbaacc" or sequence of 3 (r,g,b) or 4 elements (r,g,b,a).

Image can be loaded by (clojure2d.core/load-image "path")

zcaudate commented 5 years ago

sweet. thanks.