GithubHelp home page GithubHelp logo

rhizome's People

Contributors

alexati avatar amalloy avatar brandonbloom avatar engelberg avatar maxcountryman avatar scizo avatar whamtet avatar zmaril avatar ztellman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rhizome's Issues

bump clojure version to 1.8

cider no longer supports <1.7 versions of clojure. When connecting to the repl, this causes problems with cider. Admittedly, this is a weakness of cider, but all tests pass when bumping the version to 1.8.

Is node->cluster working for view-tree?

Hello Zach!
A genuine question, is clustering working for view-tree? My definition:

(defn show-tree [root] (viz/view-tree node-branch? node-children root :options {:dpi 48} :node->descriptor (fn [n] {:label (str n)}) :node->cluster :index))

Does not cluster on my :index key...keep up the good work!

Edges pointing to/from clusters

In Graphviz, you can have edges pointing to and from clusters. The documentation appears to be down a lot, so here's the cached version.

In short:

  • set compound=true on the graph
  • have two nodes in different clusters (you can choose to just hide them later if they're "fakes" just to be able to point at a cluster)
  • create an edge, and set lhead/ltail ("logical head/tail") to a cluster name

Right now it doesn't appear I can do this from the viz ns because cluster names are unpredictable gensyms.

AFAICT, there are two obvious ways (potentially orthogonal) to solving this problem:

  1. a node->name fn, as called for in #5 but which ended up being unnecessary there (at least I think so; that fn was called node->id but I think the id they're referring to is the name in graphviz parlance; id is for when you're producing e.g. SVG to set the id of the resulting XML element; but rhizome appears to call it "name")
  2. since I don't really care about the exact name; I just care about which name it's going to have; a memoized node->name fn e.g. in rhizome.dot would also work.

I'm a slightly bigger fan of 1 since it would also give me the option of producing more intelligible names than the gensyms, which is convenient when I'm producing the dot instead of the graphical output.

The workaround is to rebind the private dynamic *node->id*. I'm perfectly happy doing that, but I want to make sure I contribute back to rhizome. Either I can write some docs telling people how to do that, but since it's marked as private maybe that's less than ideal, and I should instead resolve (1) or (2).

string escaping failure?

(rhizome.viz/view-graph #{:a :b} {:a [:b]}
                        :edge->descriptor (fn [_ _]
                                            {:label '[:a {:b "c"}]}))
; IllegalArgumentException Error: <stdin>: syntax error in line 8 near '"'

I think I might be running aground on the "show label as record" feature, and pr-str'ing is actually what I want here (and what I thought it was doing for the longest anyway), but I thought I'd file an issue just in case.

Fails with empty cluster

(#_rhizome.dot/graph->dot
  rhizome.viz/view-graph
  [:a]
  {}
  :node->descriptor (fn [n] {:label n})
  :cluster->descriptor (fn [n] {:label n})
  :node->cluster
  {:a :cluster-a}
  :cluster->parent
  {:cluster-a :cluster-b})

Results in an empty graph.

It's fixed by adding something into cluster-b:

(#_rhizome.dot/graph->dot
  rhizome.viz/view-graph
  [:a :b]
  {}
  :node->descriptor (fn [n] {:label n})
  :cluster->descriptor (fn [n] {:label n})
  :node->cluster
  {:a :cluster-a
   :b :cluster-b}
  :cluster->parent
  {:cluster-a :cluster-b})

I am trying to show a cluster of clusters.

Also removing the cluster parent from cluster-a of course fixes this (but without it being grouped.)

Compiling (and running?) on a headless server.

Hello,

I'm using this library, and it's working well.
However, we have a headless Jenkins server that we use for creating release artifacts (RPMs), and the compilations are failing with:
Exception in thread "main" java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it., compiling:(viz.clj:24:3)
(and a long stack trace).

The machine I'm developing on has an X server (no surprise!), but the build server, and the final server don't.
(I've added Graphviz to the RPM dependencies of the release, so some things might get pulled in from there when it's installed on the server)

Is there any way to build this on a headless server?
Will it run on a headless server? (I just want it to generate SVG in answer to a web request).

Calum

second example gives NullPointerException javax.swing.ImageIcon.loadImage

user=> (use 'rhizome.viz)
nil
user=> (def g
  #_=>     {:a [:b :c]
  #_=>      :b [:c]
  #_=>      :c [:a]})
#'user/g
user=> (view-graph (keys g) g
  #_=>     :node->descriptor (fn [n] {:label n}))
nil
user=> (view-graph (keys g) g
  #_=>     :cluster->descriptor (fn [n] {:label n})
  #_=>     :node->cluster identity
  #_=>     :cluster->parent {:b :c, :a :c})

NullPointerException   javax.swing.ImageIcon.loadImage (ImageIcon.java:309)
user=> (pst)
NullPointerException
  javax.swing.ImageIcon.loadImage (ImageIcon.java:309)
  javax.swing.ImageIcon.setImage (ImageIcon.java:369)
  rhizome.viz/view-image (viz.clj:53)
  rhizome.viz/view-image (viz.clj:50)
  clojure.core/comp/fn--4156 (core.clj:2341)
  user/eval2474 (NO_SOURCE_FILE:1)
  clojure.lang.Compiler.eval (Compiler.java:6619)
  clojure.lang.Compiler.eval (Compiler.java:6582)
  clojure.core/eval (core.clj:2852)
  clojure.main/repl/read-eval-print--6588/fn--6591 (main.clj:259)
  clojure.main/repl/read-eval-print--6588 (main.clj:259)
  clojure.main/repl/fn--6597 (main.clj:277)
nil
user=> (System/getProperty "java.runtime.version")
"1.8.0-ea-b94"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.