jasongilman / proto-repl-charts

An Atom Plugin extension for Proto REPL that allows displaying graphs.
MIT License
65 stars 4 forks source link

Charting Doco Miss Match Maybe? #16

Open rayk opened 7 years ago

rayk commented 7 years ago

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

(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.

jasongilman commented 7 years ago

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?

rayk commented 7 years ago

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?