473,383 Members | 1,733 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,383 software developers and data experts.

Plotting package?

This may be a foolish question, but what's the most straightforward way to
plot a bunch of data in Python?

That is, I want to write a program that does some number crunching, and then
I want to change some parameters and watch how the changes affect the
results. I could produce a file to hand to gnuplot, but that's a bit of a
pain; so I'm wondering if there is a widely used package to which I can give
my x-y pairs and have it produce a graph for me with axes, scaling, etc.
Apr 25 '06 #1
5 1143
Try matplotlib, it's pretty nice and easy to use.

Apr 25 '06 #2
Andrew Koenig wrote:
This may be a foolish question, but what's the most straightforward way to
plot a bunch of data in Python?

That is, I want to write a program that does some number crunching, and
then I want to change some parameters and watch how the changes affect the
results. I could produce a file to hand to gnuplot, but that's a bit of a
pain; so I'm wondering if there is a widely used package to which I can
give my x-y pairs and have it produce a graph for me with axes, scaling,
etc.


I liked the output of PyChart. It is pretty easy to use. Also, I don't
know what you're doing with numbers, but there's rpy to use with R.

--
Jorge Godoy <go***@ieee.org>

"Quidquid latine dictum sit, altum sonatur."
- Qualquer coisa dita em latim soa profundo.
- Anything said in Latin sounds smart.
Apr 25 '06 #3
>>>>> "Andrew" == Andrew Koenig <ar*@acm.org> writes:

Andrew> This may be a foolish question, but what's the most
Andrew> straightforward way to plot a bunch of data in Python?
in matplotlib/pylab

from pylab import figure, show
x = range(10)
y = [val**2 for val in x]
fig = figure()
ax = fig.add_subplot(111)
ax.plot(x,y)
ax.set_title('My first plot')
ax.set_xlabel('x')
ax.set_ylabel('y')
show()

Tutorial: http://matplotlib.sourceforge.net/tutorial.html
Screenshots: http://matplotlib.sourceforge.net/screenshots.html

JDH

Apr 25 '06 #4
In article <lg*****************@bgtnsc05-news.ops.worldnet.att.net>,
"Andrew Koenig" <ar*@acm.org> wrote:
This may be a foolish question, but what's the most straightforward way to
plot a bunch of data in Python?

That is, I want to write a program that does some number crunching, and then
I want to change some parameters and watch how the changes affect the
results. I could produce a file to hand to gnuplot, but that's a bit of a
pain; so I'm wondering if there is a widely used package to which I can give
my x-y pairs and have it produce a graph for me with axes, scaling, etc.


I second all other recommendations on matplotlib.

-- Lou Pecora (my views are my own) REMOVE THIS to email me.
Apr 25 '06 #5
Andrew Koenig wrote:
This may be a foolish question, but what's the most straightforward way to
plot a bunch of data in Python?

That is, I want to write a program that does some number crunching, and then
I want to change some parameters and watch how the changes affect the
results. I could produce a file to hand to gnuplot, but that's a bit of a
pain; so I'm wondering if there is a widely used package to which I can give
my x-y pairs and have it produce a graph for me with axes, scaling, etc.

In addition to the other (excellent) suggestions, you could have a look
at Veusz [1]. It has a GUI which, in your case, you could use to create
all the boilerplate code (axes, labels, etc.) interactively and then use
the scripting interface to feed in different datasets as required. The
major limitation is that it requires Qt/PyQt 3 so I don't know how easy
it is to get working under Windows.

[1] http://home.gna.org/veusz/
Apr 26 '06 #6

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

Similar topics

3
by: srijit | last post by:
Hi, I am looking for a good plotting package (preferably with 3D plotting capabilities) based on Python 2.3 (Windows 98). Unfortunately Dislin does not exist for Python 2.3. I look forward to...
6
by: DG | last post by:
I'm interesting in finding the ultimate cross-platform python plotting module. So far I've used scipy.gplt and biggles which both have disadvantages. There is no python 2.3 binary package for...
7
by: Russell E. Owen | last post by:
Can anyone recommend a fast cross-platform plotting package for 2-D plots? Our situation: We are driving an instrument that outputs data at 20Hz. Control is via an existing Tkinter application...
6
by: ptek | last post by:
Hello all, I'm looking for a free libray for plotting 2D charts that can be integrable on C# or C++ projects under visual studio (.NET ou VS6.0). I searched using google and yahoo but I didn't...
2
by: Dr. Colombes | last post by:
Is there an easy scientific graphics (plotting) package for Python 2.5.1 running on Ubuntu Linux 7.1 ("Gutsy Gibbon")? A few years ago I used PyLab (a MatLab-like plotting module for Python) on...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.