473,396 Members | 1,963 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

creating graphs from lists

I'm developing a program in Python, with no gui, and now I've reached a
point where I would need to plot list of elements on a graph.

How can I do it? preferably in a simple way?
Luis
Jul 18 '05 #1
4 1534
Luis P. Mendes wrote:
I'm developing a program in Python, with no gui, and now I've reached a
point where I would need to plot list of elements on a graph.

How can I do it? preferably in a simple way?
Luis


Depending on how sexy must look your graph, have a look on gnuplot and
his pythonixc interface gnuplot-py, http://gnuplot-py.sourceforge.net/,
it may fits your requirements

Mutah
Jul 18 '05 #2
>>>>> "Luis" == Luis P Mendes <lu***@iname.com> writes:

Luis> I'm developing a program in Python, with no gui, and now
Luis> I've reached a point where I would need to plot list of
Luis> elements on a graph.

Luis> How can I do it? preferably in a simple way?
matplotlib has non GUI-outputs. You select these by choosing your
"backend". There are two ways of doing this, from the prompt or in a
configuration file. Let's say you have a script to plot a list

from matplotlib.matlab import *
plot([1,2,3])
savefig('somefile')

If you run this script as
python myscript.py -pPS # generate postscript somefile.ps
python myscript.py -pSVG # generate SVG somefile.svg
python myscript.py -pAGG # generate somefile.png


If you know you always want to generate png for example, you can set
this by default and don't have to supply the command line option.

matplotlib also has a GUI mode, but you don't need it.

homepage : http://matplotlib.sourceforge.net
screenshots : http://matplotlib.sourceforge.net/screenshots.html
tutorial : http://matplotlib.sourceforge.net/tutorial.html

John Hunter
Jul 18 '05 #3
Thank you for the replies.

John,

matplotlib is what I need, specially with the pcolor_demo.py module.

Thank you again.

Luis Mendes

homepage : http://matplotlib.sourceforge.net
screenshots : http://matplotlib.sourceforge.net/screenshots.html
tutorial : http://matplotlib.sourceforge.net/tutorial.html

John Hunter


Jul 18 '05 #4
Check out graphviz:

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

There are Python bindings somewhere, but I seem to recall they're
broken or incomplete. However, it's easy enough to write out a file
in graphviz' format. It does an excellent job of laying out graphs.
"Luis P. Mendes" <lu***@iname.com> wrote in message news:<ne********************@newsfront4.netvisao.p t>...
I'm developing a program in Python, with no gui, and now I've reached a
point where I would need to plot list of elements on a graph.

How can I do it? preferably in a simple way?
Luis

Jul 18 '05 #5

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

Similar topics

12
by: | last post by:
I've trolled the lists, FAQs, and Net as a whole, but can't find anything definitive to answer this. We're looking for real-time graph capability (bar, line, etc), so that we can display...
3
by: Scott Dabot | last post by:
I am trying to write a program that uses graphs and I have this algorithm for the Depth First Search. //Input: Graph G=(V, E) //Output Graph G with its vertices marked with consecutive integers...
4
by: Coskun Cavusoglu | last post by:
Hi I need to build something that works like the following example http://www.realestateabc.com/calc_v22/calculator.html How can can I do this by using c# and web forms. It will be a part of a...
2
by: Vivek | last post by:
hi i am doing a project on N/W mgmt systems using C language. i want to know how to plot graphs in C language. ... there are packages (out of the std's) available for this, such as :- GTK , QT...
2
by: robert.q.johnson | last post by:
Help. I am trying to create a web page in C# to display two rows of data with bar graphs (an image 1px). I get the max value of the row and use the following formula to size the height of the...
6
by: JanM | last post by:
Hi all, I working on a Q&A database in which several lists of questions are defined. On each question a number of answers can be given. A list of questions can be entered into the database via...
3
momotaro
by: momotaro | last post by:
Could some one explain to me what are the criteria to choose array implementation or linked lists implementation or trees implementation or graphs implementation…? THK!
4
by: =?UTF-8?B?4KSw4KS14KWA4KSC4KSm4KSwIOCkoOCkvuCkleCl | last post by:
hello friends i am trying to dynamically create graphs in browsers(as in graph theory, something like this http://sawamuland.com/flash/graph.html , not like excel graphs) but i am unable to...
15
by: Eric Lindsay | last post by:
I need to include some simple (sparkline style) graphs in a web page that will have a liquid layout. Some viewers will be changing the font size to suit their display (sizes range from 320 to 2560...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.