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.

I use pyplotlib and found it pretty easy to copy the example code. Actually I did have to do a lot of repititions of trying different things until I got the desired results, but overall it was OK, definitely worth the effort.

Yes it requires numpy but you can find that too.

Hi,

download numpy here: http://sourceforge.net/project/showfiles.php?group_id=1369&package_id=175103

download matplotlib here:
http://sourceforge.net/project/showfiles.php?group_id=80706&package_id=82474

install both and you should be set to go,
drawing a simple graph and displaying it is as simple as:

>>> from pylab import *
>>> plot([1,2,3,4])
[<matplotlib.lines.Line2D instance at 0x01A34BC0>]
>>> show()

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

Ahk Thanks alot.
Feel a tad silly about not knowing Numpy was a program. I shall got on to playing around with graph functions now so thanks alot people!

The only caveat, you have to program in TCL, not Python.

Sorry, I was assuming too much. I use PMW most of the time and not Tkinter. BLT is available through PMW. For anyone who wants to know if they have BLT installed, you can test for it with the following code, at least on my Ubuntu machine. And installing BLT installs PMW and the python wrappers as well on Ubuntu, so I'm not familiar with a manual install or dependencies. Goolge for pmw.blt if you are interested.

import Tkinter
import Pmw

top = Tkinter.Tk()
if not Pmw.Blt.haveblt(top):
   print "BLT is not installed!"
else:
   print "Good BLT install"
This article has been dead for over six months. Start a new discussion instead.