From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Path: eternal-september.org!reader02.eternal-september.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: Import Python library into an Ada package? Date: Fri, 4 Dec 2020 21:40:43 +0200 Organization: Tidorum Ltd Message-ID: References: <7223f058-c593-4905-b9ba-0a5cb3e64de2n@googlegroups.com> <0fe9f823-8923-41a8-bd47-347a64be3f72n@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: individual.net ujF2tMRCSLLf5Xkfb9YXdgDBBt0fXcsuB+Nz9rnsrappGaGb/K Cancel-Lock: sha1:Neakhvh7L7t1c91fLCODuwyNOwI= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Thunderbird/78.4.3 In-Reply-To: <0fe9f823-8923-41a8-bd47-347a64be3f72n@googlegroups.com> Content-Language: en-US Xref: reader02.eternal-september.org comp.lang.ada:60708 List-Id: On 2020-12-04 21:08, Roger Mc wrote: > On Saturday, December 5, 2020 at 5:33:00 AM UTC+11, björn lundin wrote: >> Den 2020-12-04 kl. 14:22, skrev Niklas Holsti: >>> If you want to use Graphviz just to draw automatically laid-out graphs, >>> there is another way, that I have used: make the Ada program write out >>> the graph definition as a text file in the "dot" language, and then >>> invoke the "dot" program from Graphviz to lay out and draw the graph >>> into some graphical format. >> And if you really just want to draw graphs - and can use another tool - >> gnuplot can be controlled by spawning it and send commands on stdin via >> pipes. >> >> >> -- >> Björn > Thanks for the many helpful comments regarding Graphviz. > I shall certainly consider using these for my project. > I'm not sure what is meant by "automatically laid-out graphs". Graphviz and in particular its "dot" tool are used to draw nice views of "graphs" that consist of nodes and arcs, not the simple kind of x-y plot "graph" that we so often look at nowadays -- showing how the pandemic curve is growing or flattening -- and that, AIUI, gnuplot is mostly used for. In the "dot" language, one defines a node-and-arc graph by listing and naming all the nodes and then listing all the arcs from one node to another. The "dot" tool performs an automatic lay-out that places the nodes on the two-dimensional plane (= drawing surface) so that few arcs cross other arcs, and most arcs connect nodes that are close together -- in other words, a a visually clear and neat node-arc graphic instead of an arbitrary spaghetti. The "dot" language and tool provide many ways to control the lay-out and to annotate it. Very flexible.