| | |
Graphing with Python?
Please support our Python advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Jan 2008
Posts: 10
Reputation:
Solved Threads: 0
I am undergoing a school project, which is a projectile calculator and graphing.
Now I do not want any code or tips or anything as I think I am going well however one issue I am unable to resolve is how to generate a graph.
I have spent an hour or two googling python graphers and python plotters etc... came across a program called pyplotlib however I was unable to get it to work and was citing something called numpy was missing from a line. (I was using a sample code that was on the website so it should be error free)
Anyway essentially I need a way to generate graphs in Python, Any links to good websites, program links and tutorial links would be appreciated.
I know it is a bit rude that my first post on a forum to be a plee for help, but to be honest I really have not got much to offer to other people who ask for help so please excuse my rudeness.
Now I do not want any code or tips or anything as I think I am going well however one issue I am unable to resolve is how to generate a graph.
I have spent an hour or two googling python graphers and python plotters etc... came across a program called pyplotlib however I was unable to get it to work and was citing something called numpy was missing from a line. (I was using a sample code that was on the website so it should be error free)
Anyway essentially I need a way to generate graphs in Python, Any links to good websites, program links and tutorial links would be appreciated.
I know it is a bit rude that my first post on a forum to be a plee for help, but to be honest I really have not got much to offer to other people who ask for help so please excuse my rudeness.
Hi,
download numpy here: http://sourceforge.net/project/showf...kage_id=175103
download matplotlib here:
http://sourceforge.net/project/showf...ckage_id=82474
install both and you should be set to go,
drawing a simple graph and displaying it is as simple as:
Obviously you can do a lot more than that, there is a pretty good tutorial on using it here:
http://matplotlib.sourceforge.net/tutorial.html
download numpy here: http://sourceforge.net/project/showf...kage_id=175103
download matplotlib here:
http://sourceforge.net/project/showf...ckage_id=82474
install both and you should be set to go,
drawing a simple graph and displaying it is as simple as:
python Syntax (Toggle Plain Text)
>>> from pylab import * >>> plot([1,2,3,4]) [<matplotlib.lines.Line2D instance at 0x01A34BC0>] >>> show()
http://matplotlib.sourceforge.net/tutorial.html
Vega left a small code snippet about plotting with Tkinter, check:
http://www.daniweb.com/code/snippet578.html
http://www.daniweb.com/code/snippet578.html
Never argue with idiots, they'll just bring you down to their level and beat you with their experience.
•
•
Join Date: Dec 2006
Posts: 1,056
Reputation:
Solved Threads: 298
Just to be complete, BLT adds graphing to the TCL/Tk toolkit. Use whichever of the suggestions seems best to you. They will all work. http://incrtcl.sourceforge.net/blt/
Last edited by woooee; Mar 27th, 2008 at 3:23 pm.
•
•
•
•
Just to be complete, BLT adds graphing to the TCL/Tk toolkit. Use whichever of the suggestions seems best to you. They will all work. http://incrtcl.sourceforge.net/blt/
drink her pretty
•
•
Join Date: Dec 2006
Posts: 1,056
Reputation:
Solved Threads: 298
•
•
•
•
The only caveat, you have to program in TCL, not Python.
Python Syntax (Toggle Plain Text)
import Tkinter import Pmw top = Tkinter.Tk() if not Pmw.Blt.haveblt(top): print "BLT is not installed!" else: print "Good BLT install"
Last edited by woooee; Mar 27th, 2008 at 5:46 pm.
![]() |
Similar Threads
Other Threads in the Python Forum
- Previous Thread: Reading binary files
- Next Thread: Password Storage System.
| Thread Tools | Search this Thread |
Tag cloud for Python
address anydbm app beginner cipher client code conversion coordinates curves development dictionary dynamic examples excel feet file float font format ftp function generator getvalue gui handling homework images import input ip java keycontrol line linux list lists loan loop maintain maze microcontroller millimeter mouse mysqldb number numbers output parsing path permissions port prime program programming projects py2exe pygame pymailer pyqt python queue random raw_input recursion recursive scrolledtext searchingfile shebang slicenotation socket split ssh string strings table terminal text thread threading time tkinter tlapse tooltip tuple tutorial type ubuntu unicode url urllib urllib2 variable variables vigenere web windows wx.wizard wxpython xlwt






