proto-repl-charts icon indicating copy to clipboard operation
proto-repl-charts copied to clipboard

Charting Doco Miss Match Maybe?

Open rayk opened this issue 8 years ago • 2 comments

Long last I have project where charting from the REPL solves so many issues... But for the life of me I can not getting it to run.. So I shall share all the thing things I have tried.

Setup

  • Atom 1.15.0
  • Mac OS X 10.12.3
(defproject cljlab "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "http://example.com/FIXME"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.8.0"]
                 [proto-repl-charts "0.3.2"]
                 [proto-repl "0.3.1"]
                 [org.clojure/tools.namespace "0.2.11"]]

  :plugins [[lein-ancient "0.6.10"]]

  :main ^:skip-aot cljlab.core
  :target-path "target/%s"
  :profiles {:uberjar {:aot :all}})

This Gist contains my full github config

Steps

  1. Alt CMD L Start the repl... No problems starts in the user namespace.
  2. (in-ns 'cljlab.core) works no problems.
cljlab.core
(ns cljlab.core)

(defn -main
  "I don't do a whole lot ... yet."
  [& args]
  (println "Hello, World!"))


(def data-table
  "Doc String that describes the data-table."
  [{:seat "North 1" :align "Right"}
   {:seat "South 1" :align "Left"}
   {:seat "North 2" :align "Right"}
   {:seat "West 1" :align "Right"}
   {:seat "East 1" :align "Left"}])

So let's do a simple table, as per instructions

  1. I enter (proto-repl-charts.table/table "Table Name" data-table) into the file and execute the block.

screen shot 2017-03-10 at 4 58 21 pm

I understand this to mean that proto-repl-charts...... can not be loaded. Well I can not require it in, assuming there is not class... But try anyhow.

screen shot 2017-03-10 at 5 02 41 pm

When autocomplete and all else falls check out the doco... So I found the namespace prc in the doco.

screen shot 2017-03-10 at 5 05 58 pm

But appears to be Deprecated. Yet it appears to work...

screen shot 2017-03-10 at 5 07 46 pm

and it makes a table...

screen shot 2017-03-10 at 5 08 27 pm

Well sort of the Vector has five elements but the table has six row...

(proto-repl-charts.charts/scatter-chart "Scatter" {:dist1 [4.788594844315898
                                                           4.788594844315898 
                                                           4.788594844315898 
                                                           4.788594844315898 
                                                           4.788594844315898 
                                                           4.788594844315898
                                                           4.788594844315898 
                                                           4.788594844315898
                                                           4.788594844315898 
                                                           5.351650552658307 
                                                           5.351650552658307 
                                                           5.351650552658307 
                                                           5.351650552658307 
                                                           5.351650552658307 
                                                           4.707906378929781 
                                                           5.351650552658307 
                                                           5.351650552658307 
                                                           5.351650552658307 
                                                           5.351650552658307 
                                                           5.351650552658307]})

This also appears cool.

screen shot 2017-03-10 at 5 21 08 pm


So here is the question... Is the Doc out of date, or have I gotten the wrong end of the stick?

Any insight appreciated... Thanks in advance.

Ray.

BTW: Happy to fix it and give you a pull request, just want some direction and thinking on your picture.

rayk avatar Mar 10 '17 06:03 rayk

Thanks for the detailed issue. I'm not sure which specific issue you're running into. You said at the beginning that you couldn't get it working but it seems like you have most of the features working by the end. If there a specific problem you can't get past?

jasongilman avatar Mar 16 '17 00:03 jasongilman

Hi Jason

Sorry for the lack of clarity.

The core question is:

The doco states the prc is deprecated (0.3.1) in favor of proto-repl-charts is this correct? If so, how do I just charting working without requiring in prc?

rayk avatar Mar 22 '17 00:03 rayk