473,756 Members | 2,721 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

prog/lib to draw graphs

Hello,
I'm looking for a program or python library to draw graphs.
They should look like the that:
/--------\ /--------\
| Node A | ------ belongs to ----> | Node B |
\--------/ \--------/

Which is a result of the function call like that:

connectNodes(fi rstNode, secondNode, description, lineStyle)
connectNodes("N ode A", "Node B", "belongs to", dashed)

It should have a open scalable vector format as output (DVI, SVG, PDF, ...)
and should be able to make automatic optimal placement of the items.
Do you know something like that?
Thx,
Florian
Jul 18 '05 #1
7 2377
Florian Lindner wrote:
Hello,
I'm looking for a program or python library to draw graphs.
They should look like the that:
/--------\ /--------\
| Node A | ------ belongs to ----> | Node B |
\--------/ \--------/

Which is a result of the function call like that:

connectNodes(fi rstNode, secondNode, description, lineStyle)
connectNodes("N ode A", "Node B", "belongs to", dashed)

It should have a open scalable vector format as output (DVI, SVG, PDF, ...)
and should be able to make automatic optimal placement of the items.
Do you know something like that?
Thx,
Florian


Try graphviz:

http://www.research.att.com/sw/tools/graphviz/
I think there's a python interface to graphviz floating around (Google
it), but it's trivial to write a Python routine that spits out valid
Graphviz "dot" files.

In the case of your example, the contents of the dot file would be
something like:

digraph G{
"Node A" -> "Node B" [label="belongs to"];
}
--Paul
Jul 18 '05 #2
>>>>> "Florian" == Florian Lindner <Fl************ *@xgm.de> writes:

Florian> Hello, I'm looking for a program or python library to
Florian> draw graphs. They should look like the that:
Florian> /--------\ /--------\ | Node A | ------ belongs to ---->
Florian> | Node B | \--------/ \--------/

Florian> Which is a result of the function call like that:

Florian> connectNodes(fi rstNode, secondNode, description,
Florian> lineStyle) connectNodes("N ode A", "Node B", "belongs to",
Florian> dashed)

Florian> It should have a open scalable vector format as output
Florian> (DVI, SVG, PDF, ...) and should be able to make
Florian> automatic optimal placement of the items. Do you know
Florian> something like that? Thx, Florian --
Florian> http://mail.python.org/mailman/listinfo/python-list

graphviz is a sophisticated graph drawing program

http://www.research.att.com/sw/tools/graphviz/

There is a python interface

http://www.cs.virginia.edu/~jg9h/graphiz/

JDH
Jul 18 '05 #3
[P&M]

Florian Lindner wrote:
Hello,
I'm looking for a program or python library to draw graphs.
They should look like the that:
/--------\ /--------\
| Node A | ------ belongs to ----> | Node B |
\--------/ \--------/

Florian -

Graphviz (http://www.graphviz.org) is a great package for drawing
graphs. It ouputs to many formats. There is a python lib for it at
http://www.freshports.org/graphics/py-graphviz/, but I have not used
it. It's easy enough to generate dot[1] code and call dot to generate
the graph image, so that's what I usually do.

HTH,

Bill
1. 'dot' is one of the graphviz commands.
Which is a result of the function call like that:

connectNodes(f irstNode, secondNode, description, lineStyle)
connectNodes(" Node A", "Node B", "belongs to", dashed)

It should have a open scalable vector format as output (DVI, SVG, PDF, ...)
and should be able to make automatic optimal placement of the items.
Do you know something like that?
Thx,
Florian

Jul 18 '05 #4
netnews.upenn.e du wrote:
Florian Lindner wrote:
Hello,
I'm looking for a program or python library to draw graphs.
They should look like the that:
/--------\ /--------\
| Node A | ------ belongs to ----> | Node B |
\--------/ \--------/

Which is a result of the function call like that:

connectNodes(fi rstNode, secondNode, description, lineStyle)
connectNodes("N ode A", "Node B", "belongs to", dashed)

It should have a open scalable vector format as output (DVI, SVG, PDF,
...) and should be able to make automatic optimal placement of the items.
Do you know something like that?
Thx,
Florian


Try graphviz:

http://www.research.att.com/sw/tools/graphviz/
I think there's a python interface to graphviz floating around (Google
it), but it's trivial to write a Python routine that spits out valid
Graphviz "dot" files.

In the case of your example, the contents of the dot file would be
something like:

digraph G{
"Node A" -> "Node B" [label="belongs to"];
}


Thanks! (to all)
Does GraphViz also support the automated optimal placement of nodes? I'll
have many nodes...
Thx,
Florian
Jul 18 '05 #5
graphivz seems good but it is an external tool... Is there something
similar as http://gef.tigris.org for python ?

Yermat

Jul 18 '05 #6

On Jan 22, 2004, at 5:15 AM, Florian Lindner wrote:
Thanks! (to all)
Does GraphViz also support the automated optimal placement of nodes?
I'll
have many nodes...


What constitutes optimal is a matter of an entire subfield of graph
theory, and is pretty different depending on what type of graph you are
doing. Nonetheless, graphviz does pretty well without any cues. In a
project I used to use it in (a browser for large automatically learned
ontologies) I would sometimes use it to render thousands of nodes, and
it would usually look better than I expected. There is a problem in
that highly connected large graphs result in a lot of black ink for the
edges, since in such graph they will be much denser than the DPI of
your screen. I'm not sure you'll find any full display of a large
graph practical for interactive use without a lot of tweaking.

If you do want to use it interactively, be prepared for long waits
(>30s, sometimes several minutes) for very large graphs. For small
graphs, it's near instantaneous. This is a problem with graph layout
algorithms in general, however, and not graphviz per se - they do not
scale very efficiently. People I know who used ygraph, a commercial
package, told me that it was not much faster on large graphs.

hope that helps,
-kyle
Jul 18 '05 #7
Florian Lindner <Fl************ *@xgm.de> wrote in message news:<bu******* ******@news.t-online.com>...
Hello,
I'm looking for a program or python library to draw graphs.
They should look like the that:
/--------\ /--------\
| Node A | ------ belongs to ----> | Node B |
\--------/ \--------/

Which is a result of the function call like that:

connectNodes(fi rstNode, secondNode, description, lineStyle)
connectNodes("N ode A", "Node B", "belongs to", dashed)

It should have a open scalable vector format as output (DVI, SVG, PDF, ...)
and should be able to make automatic optimal placement of the items.


Since you mention DVI you probably know about LaTeX. You might
want to try its `psfrag' package, which can do all you want and
more. Learning curve is a bit steep, but the results are _very_
high quality. Nothing to do with Python though......
Jul 18 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
3144
by: Mark Fenbers | last post by:
I am investigating Python for the sake of ultimately generating hydrographs (such as this: http://ahps.erh.noaa.gov/iln/ahps/RiverDat/gifs/prgo1.png) on-the-fly from a web server cluster. I have not used Python previously and do not yet know if Python is very useful for this or if I am wasting my time. Quite frankly, I am a little bewildered. Not only is there Python, but there are many extention modules which cloud up my view as to...
9
7073
by: rhmd | last post by:
I need to create image files (eg bmp or jpeg) of xy scatter graphs (i.e., graphs in which markers denote individual points; the markers need to be small polygons of various sizes, shapes, colors, shadings, etc. and there are thousands on them on each graph). Have been using MS Excel, but its limitations are unbelievable (only whole number sizes, no way around a 56 color palette, only low quality jpeg files so that when I publish the...
22
1154
by: MJR | last post by:
Hi, just wondering what options I would have if I wanted to use Python to produce real-time graphs. Is there any plotting package suitable for this. Thanks, Mike
6
2252
by: gong | last post by:
hi i recently looked at alexandrescu's book on c++, and i found it pretty much unintelligible. i have a few points which i wonder about. 1. as a developer, it is important, from a bottom line standpoint, to make code as transparent as possible. through its lifecycle, code inevitably becomes larger and more complex to cope with unexpected demands. if the starting point looks like alexandrescu's code, it will require very specialized...
16
11877
by: David Lauberts | last post by:
Hi Wonder if someone has some words of wisdom. I have a access 2002 form that contains 2 graph objects that overlay each other and would like to export them as a JPEG to use in a presentation. I can do this individually for each graph but this does not help me as I need both on the same JPEG. I thought I would try an export the form that contains both but I am having trouble. (My VBA is self taught and a little knowledge is...
0
590
by: Ray Mitchell | last post by:
Hello, I need to write an application that displays multiple graphs on multiple tabbed sheets in a single window. The graphs are all simple X-Y line graphs like you'd see on an oscilloscope, but with labeled coordinates. I need everything (including the fonts if possible) to scale as I resize the window. I'm debating about using MFC or C# but I'd like to use C#. (I assume, however, that .NET will not work on Windows NT.) Is there...
0
372
by: Bruce Schechter | last post by:
I need to generate a series of line charts dynamically from ADO.NET data in an ASP.NET application. I've read several articles about using GDI+ to render graphs into a bitmap image and then to place those images within an ..aspx page. If necessary, I'll do all the hand-coding in that way. But I'd rather not. :) On the contrary, I'm posting here to see if anyone can recommend either (1) a readily available custom control to handle...
4
1874
by: Giandomenico Sica | last post by:
Call for Cooperation An Atlas of Linguistic Graphs I'm a researcher in graph theory and networks. I'm working about a project connected with the theory and the applications of linguistic graphs, which are mathematical structures useful to represent languages and consequently to manage the organization of data in different kinds of scientific fields. At the present I'm developing an application of these graphs to medicine,
18
7202
by: raghunadhs | last post by:
Hi All, I have few pairs of float vlues, like (1.5,4.5),(4.67,8.90)..etc. Now i want to draw a graph among the points. is there any "Graph" control? is it possible to draw graphs in V.B 6.0? if it is possible,kindly let me know it. Thanks in advance: regards: raghunadhs.
0
9275
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10034
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9872
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9843
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7248
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5142
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5304
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3805
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2666
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.