|
From: Michel T. <ta...@lp...> - 2017-06-24 08:50:55
|
Le 24/06/2017 à 08:38, Hans-Peter Vietze a écrit : > I tried to use one of the graphviz functions to visualize a graph, but > did not succeed. I tried the attempt of Michel Talon but got an error > message: > > --> > Nachricht vom stdout von wxMaxima: Maxima 5.39.0_2_g5a49f11_dirty > http://maxima.sourceforge.net > using Lisp CLISP 2.49 (2010-07-07) > Distributed under the GNU Public License. See the file COPYING. > Dedicated to the memory of William Schelter. > The function bug_report() provides bug reporting information. > (%i1) > --> load(graphs); > 0 errors, 0 warnings > 0 errors, 0 warnings > (%o1) > "C:\maxima-5.39.0\share\maxima\5.39.0_2_g5a49f11_dirty\share\graphs\graphs.mac" > > --> > g:create_graph(16,[[0,1],[1,3],[2,3],[0,2],[3,4],[2,4],[5,6],[6,4],[4,7],[6,7],[7,8],[7,10],[7,11],[8,10],[11,10],[8,9],[11,12],[9,15],[12,13],[10,14],[15,14],[13,14]]); > > (g) GRAPH\(16 vertices, 22 edges\) > --> mi:max_independent_set(g); > (mi) [0,3,5,8,11,13,15] > --> draw_graph(g,redraw=true,program=dot); > first: empty argument. > #0: draw_graph(g=GRAPH\(16\ vertices\,\ 22\ edges\),options=[redraw > = true,program = dot]) > (C:\maxima-5.39.0\share\maxima\5.39.0_2_g5a49f11_dirty\share\graphs\draw_graph.mac > line 166) > -- an error. To debug this try: debugmode(true); > Message from maxima's stderr stream: Der Befehl "dot" ist entweder > falsch geschrieben oder > konnte nicht gefunden werden. I have tried several examples of the documentation for draw_graph and they work for me, that is a windows appears with the graph drawn. However i am under Linux and using sbcl, while you are using clisp and Windows. In fact your program works on my machine. I see first a compilation of numericalio, and the the graph is drawn. One remark: against localization of programs. With localization, when an error message appears, it is localized, and thus impossible to understand precisely for someone who doesn't speak the language. For an open source software this limits the number of people who can help. English is "lingua franca" for scientific stuff, and allows everyone to collaborate. Second: the error at line 166 of draw_graph.mac is not directly related to dot. The line says dimension : length(second(first(v_pos))) which is coherent with first: empty argument in other words v_pos is undefined when first is called. But just before one has v_pos : apply(program, [G]), set_positions(v_pos, G)), I don't know what is set_positions, it is not defined in the file. Anyways probably your maxima cannot find the dot program. It is called this way: if program = 'dot then command : concat("dot -Tplain \"", gp_file_in, "\" > \"", gp_file_out, "\"") ... system(command), So the invocation system("dot -Tplain ...") has to succeed. Probably dot has to be in your path in Windows and perhaps more. The syntax to call external programs may vary from lisp to lisp, and something which works with sbcl may not work with clisp. Note it is the path variable of windows which is impoirtant here, not the file_search_maxima path list. -- Michel Talon |