Skip to content

Commit

Permalink
v0.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
BostX committed Apr 11, 2022
1 parent 1eb8654 commit 5b4f9e5
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 34 deletions.
31 changes: 16 additions & 15 deletions project.clj
@@ -1,15 +1,16 @@
(defproject cljplot "0.0.2a-SNAPSHOT"
:description "JVM chart library"
:url "https://github.com/generateme/cljplot"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.10.1"]
[generateme/fastmath "2.0.3"]
[clojure2d "1.4.0"]
[clojure.java-time "0.3.2"]
[org.clojure/data.csv "1.0.0"]
[org.clojure/data.json "1.0.0"]]
:repl-options {:timeout 120000}
:java-source-paths ["src"]
:javac-options ["-target" "1.8" "-source" "1.8"]
:target-path "target/%s")
(defproject org.clojars.bost/cljplot "0.0.3"
:description "JVM chart library"
:url "https://github.com/generateme/cljplot"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.11.1"]
[generateme/fastmath "2.1.8"]
[clojure2d "1.4.4"]
[clojure.java-time "0.3.3"]
[org.clojure/data.csv "1.0.1"]
[org.clojure/data.json "2.4.0"]]
:repl-options {:timeout 120000}
:java-source-paths ["src"]
;; :javac-options ["-target" "1.8" "-source" "1.8"]
:target-path "target/%s"
:deploy-repositories [["clojars" {:sign-releases false}]])
37 changes: 18 additions & 19 deletions src/cljplot/common.clj
Expand Up @@ -63,7 +63,7 @@
(defn wrap-interpolator-for-dt
"Wrap interpolator to work with date/time values."
[interpolator domain x y]
(if (date-time? (first x))
(if (date-time? (first x))
(let [scale (s/time-interval domain)
interp (interpolator (mapv scale x) y)]
(fn [v]
Expand Down Expand Up @@ -216,23 +216,23 @@

;;

(defn- triangle-shape
""
[canv x y hsize size angle stroke?]
(let [size (double size)
hsize (double hsize)
size3 (/ size 3.0)
size6 (+ size3 size3)]
(-> canv
(push-matrix)
(translate x y)
(rotate (m/radians angle))
(triangle (- hsize) (- size3)
(+ hsize) (- size3)
0 (+ size6) stroke?)
(pop-matrix))))

(defn draw-shape
;; (defn- triangle-shape
;; ""
;; [canv x y hsize size angle stroke?]
;; (let [size (double size)
;; hsize (double hsize)
;; size3 (/ size 3.0)
;; size6 (+ size3 size3)]
;; (-> canv
;; (push-matrix)
;; (translate x y)
;; (rotate (m/radians angle))
;; (triangle (- hsize) (- size3)
;; (+ hsize) (- size3)
;; 0 (+ size6) stroke?)
;; (pop-matrix))))

(defn draw-shape
""
[canv x y type color stroke size]
(-> canv
Expand Down Expand Up @@ -395,4 +395,3 @@

(defn read-csv [f] (rest (with-open [reader (io/reader f)]
(doall (csv/read-csv reader)))))

0 comments on commit 5b4f9e5

Please sign in to comment.