By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,129 Members | 2,300 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,129 IT Pros & Developers. It's quick & easy.

jpype with JFreeChart, anyone interested to help?

P: n/a
As you may know, there is no beautiful and free chart(not plot, you
can find the examples at http://www.jfree.org/jfreechart,
http://www.rmchart.com) module for python than runs on
windows/linux/mac osx.

On the other hand, there is a living
package(http://www.jfree.org/jfreechart) for java, and it is nice. So
what about make the interface to JFreeChart via
jpype(http://jpype.sourceforge.net), or rewrite JFreeChart in and for
Python to kick off JVM?

I have tried this, but since I don't know Java, I did not go further.
If anyone can help me with the following code, or organzie a
py_jfreechart team, or put up a pyFreeChart team, that would be great.

Thanks

Expand|Select|Wrap|Line Numbers
  1. import jpype
  2.  
  3. p=r'e:\Java\j2re1.4.0\bin\client\jvm.dll'
  4. jpype.startJVM(p,
  5. r'-Djava.class.path=h:\jfreechart-1.0.9\lib\jfreechart-1.0.9.jar' )
  6.  
  7. pkg=jpype.JPackage("org.jfree.data")
  8. print pkg.DefaultKeyedValues
  9. print pkg.DefaultKeyedValues.DefaultKeyedValues
  10. print pkg.DefaultKeyedValues.DefaultKeyedValues.DefaultKeyedValues
  11.  
  12. jc=jpype.JClass("org.jfree.data.DefaultKeyedValues")
  13.  
[msg]
<Java package org.jfree.data.DefaultKeyedValues>
<Java package org.jfree.data.DefaultKeyedValues.DefaultKeyedValu es>
<Java package org.jfree.data.DefaultKeyedValues.DefaultKeyedValu es.DefaultKeyedV
alues>
Traceback (most recent call last):
File "H:\jfreechart-1.0.9\lib\b.py", line 11, in <module>
jc=jpype.JClass("org.jfree.data.DefaultKeyedValues ")
File "H:\jfreechart-1.0.9\lib\jpype\_jclass.py", line 54, in JClass
raise _RUNTIMEEXCEPTION.PYEXC("Class %s not found" % name)
jpype._jexception.ExceptionPyRaisable: java.lang.Exception: Class
org.jfree.data.DefaultKeyedValues not found
[/msg]
Jan 14 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Jan 14, 6:51 am, oyster <lepto.pyt...@gmail.comwrote:
As you may know, there is no beautiful and free chart(notplot, you
can find the examples athttp://www.jfree.org/jfreechart,http://www.rmchart.com) module for python than runs on
windows/linux/mac osx.
Actually, may I humbly suggest two:

Chaco: http://code.enthought.com/chaco/gallery/index.shtml

matplotlib: http://matplotlib.sourceforge.net/
-Peter

Jan 14 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.