1.2.3-SNAPSHOT Arrow_down_16x16

add-image

incanter.charts

  • (add-image chart x y img & options)
Adds an image to the chart at the given coordinates.

Arguments:
chart -- the chart to add the polygon to.
x, y -- the coordinates to place the image
img -- a java.awt.Image object


Examples:
(use '(incanter core charts latex))

(doto (function-plot sin -10 10)
(add-image 0 0 (latex "\\frac{(a+b)^2} {(a-b)^2}"))
view)

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source incanter/charts.clj:2562 top

(defn add-image
" Adds an image to the chart at the given coordinates.

  Arguments:
    chart -- the chart to add the polygon to.
    x, y -- the coordinates to place the image
    img -- a java.awt.Image object


  Examples:
    (use '(incanter core charts latex))   

     (doto (function-plot sin -10 10)
      (add-image 0 0 (latex \"\\\\frac{(a+b)^2} {(a-b)^2}\"))
      view)

"
  ([chart x y img & options]
    (let [opts (when options (apply assoc {} options))
	  anno (org.jfree.chart.annotations.XYImageAnnotation. x y img)]
      (.addAnnotation (.getPlot chart) anno))))
Vars in incanter.charts/add-image: defn let
Used in 0 other vars

Comments top

No comments for add-image. Log in to add a comment.