Lisp HUG Maillist Archive

More CAPI graph-pane questions

Hi

how do I get a graph pane to display a "labelled" edge between two 
vertices? Is it easy to do?

Thanks

Marco


--
Marco Antoniotti					http://bioinformatics.nyu.edu
NYU Courant Bioinformatics Group		tel. +1 - 212 - 998 3488
715 Broadway 10th FL				fax. +1 - 212 - 998 3484
New York, NY, 10003, U.S.A.


Re: More CAPI graph-pane questions

Marco Antoniotti wrote:
> Hi
> 
> how do I get a graph pane to display a "labelled" edge between two 
> vertices? Is it easy to do?
> 

I think so..

(capi:contain
  (make-instance 'capi:graph-pane
                 :roots '((1 (2) (3)) (4 (5) (6)))
                 :children-function #'cdr
                 :edge-pane-function
                 (lambda (graph-pane from to)
                   (make-instance 'capi:labelled-line-pinboard-object
                                  :text (format nil "~A->~A" (car from) (car to))))))

Wade


Updated at: 2020-12-10 08:54 UTC