diff -r a04ca5a66178 -r 45ac54093c09 20231124.org --- a/20231124.org Tue Aug 27 21:35:44 2024 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ -* cl-dot examples -:PROPERTIES: -:ID: c5f4f25c-071b-4a2d-85bc-08676eacce5d -:END: -#+begin_src lisp -(defmethod cl-dot:graph-object-node ((graph (eql 'example)) (object cons)) - (make-instance 'cl-dot:node - :attributes '(:label "cell \\N" - :shape :box))) -(defmethod cl-dot:graph-object-points-to ((graph (eql 'example)) (object cons)) - (list (car object) - (make-instance 'cl-dot:attributed - :object (cdr object) - :attributes '(:weight 3)))) -;; Symbols -(defmethod cl-dot:graph-object-node ((graph (eql 'example)) (object symbol)) - (make-instance 'cl-dot:node - :attributes `(:label ,object - :shape :hexagon - :style :filled - :color :black - :fillcolor "#ccccff"))) -(let* ((data '(a b c #1=(b z) c d #1#)) - (dgraph (cl-dot:generate-graph-from-roots 'example (list data) - '(:rankdir "LR" :layout "twopi" :labelloc "t")))) - (cl-dot:dot-graph dgraph "test-lr.svg" :format #+nil :x11 :svg)) -#+end_src - -#+RESULTS: - -#+begin_src lisp -(let* ((data '(a b)) - (dgraph (cl-dot:generate-graph-from-roots 'example (list data) - '(:rankdir "LR")))) - (cl-dot:print-graph dgraph)) -#+end_src