We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProcessing DevelopmentLibraries,  Tool Development › new plottting library -- seeking feedback
Page Index Toggle Pages: 1
new plottting library -- seeking feedback (Read 4349 times)
new plottting library -- seeking feedback
Jan 13th, 2010, 2:20pm
 
Plotting is a very simple new Processing library. It makes it easier to create plots and diagrams for 1D and 2D data. Supports most common plot features, such as grid axes, grid lines, tick marks and labels. Some features are omitted for brevity, such as multiple sets of axes, node symbols, node labels.
Configurable stroke widths and colors on most public properties.
Javadoc, demo and examples are included into the distribution.
Project location: http://code.google.com/p/plotting

Let me know how it works for you!
Re: new plottting library -- seeking feedback
Reply #1 - Jan 19th, 2010, 10:15am
 
hey ramon i tried running your examples... could you have to recompile your library in java 1.5...

otherwise you get this error

This version of Processing only supports libraries and JAR files compiled for Java 1.5.
A library used by this sketch was compiled for Java 1.6 or later,
and needs to be recompiled to be compatible with Java 1.5.
Exception in thread "Animation Thread" java.lang.UnsupportedClassVersionError: Bad version number in .class file
     at java.lang.ClassLoader.defineClass1(Native Method)
     at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
     at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
     at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
     at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
     at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
     at java.security.AccessController.doPrivileged(Native Method)
     at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:280)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
     at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
     at example2.setup(example2.java:36)
     at processing.core.PApplet.handleDraw(PApplet.java:1402)
     at processing.core.PApplet.run(PApplet.java:1327)
     at java.lang.Thread.run(Thread.java:613)
Re: new plottting library -- seeking feedback
Reply #2 - Apr 12th, 2010, 9:18am
 
I am very interested in finding a plotting library that is simple to use like yours seems to be. Unfortunately, I couldn't make it work. I tried the examples, but got the following error:

Cannot find a class or type named "Rectangle"


Re: new plottting library -- seeking feedback
Reply #3 - Apr 12th, 2010, 9:38am
 
With Processing 1.1, you should add:
import java.awt.*;
to the start of the sketch.
Re: new plottting library -- seeking feedback
Reply #4 - Apr 12th, 2010, 1:09pm
 
Or locally just  declare java.awt.Rectangle. Works fine for me on my linux box. Smiley
Re: new plottting library -- seeking feedback
Reply #5 - Apr 12th, 2010, 4:11pm
 
PhiLho  wrote on Apr 12th, 2010, 9:38am:
With Processing 1.1, you should add:
import java.awt.*;
to the start of the sketch.

It worked just fine (I had to unchecked the JS2SE 5.0 32 bit in the Java preferences panel in Mac OS X). It looks great. Just what I was looking for.

Thanks.
Re: new plottting library -- seeking feedback
Reply #6 - Apr 13th, 2010, 2:09pm
 
Joe wrote on Apr 12th, 2010, 4:11pm:
...I had to unchecked the JS2SE 5.0 32 bit in the Java preferences panel in Mac OS X...

Oops! By doing this I prevented the Serial library and/or the Arduino-Firmata to work. I am not sure but I think that the Serial library requires J2SE 5.0. I am trying to plot values read from the Arduino running Standard Firmata. So, it seems that I cannot use the plotting library along with Arduno.

Would it be possible to recompile the plotting library to make it compatible with the serial library

Thanks.
Re: new plottting library -- seeking feedback
Reply #7 - Apr 13th, 2010, 3:27pm
 
Ok! here I found the explanation:

http://processing.org/reference/troubleshooting/#java

I am new to Processing and Java, so probably I was the only one not aware this.

I think that in order to make the plotting library compatible with the rest of Processing PDE you will have to recompile it for java 1.5.
Re: new plottting library -- seeking feedback
Reply #8 - Apr 14th, 2010, 1:11am
 
hi joe, the library needs to be recompiled with java 1.5 in this case, that is correct.
java libraries that are compiled with java 1.6 do work on systems with 1.6 installed but obviously not on systems with 1.5. the plotting library uses the processing library template to compile the library, this template is supposed to take care of this 1.5/1.6 compatibility, but unfortunately a tiny mistake did not allow to do this job properly.
i just updated the processing library template with a fixed build.xml file (see issue), which would need to be updated by library creators for their projects as well to avoid the 1.5/1.6 issue.
i recompiled the plotting lib with 1.5, temporary download.
Re: new plottting library -- seeking feedback
Reply #9 - Apr 14th, 2010, 6:02am
 
@sojamo: thanks for recompiling the library. I wanted to test it but was too busy/lazy to do the compilation.

It's nice to see another plotting library for Processing. Most people probably don't need this type of display but it is really useful in science. I like this one for being very simple and easy for beginners (I realise that the examples in our own plotting library are probably a bit frightening for beginners).

Andreas
Re: new plottting library -- seeking feedback
Reply #10 - Apr 20th, 2010, 11:25am
 
Hey everyone, thanks for your test-drive and for the patience as well.
It took me awhile to make a next version.  Shocked Minor improvements are mostly in the internal mechanics how plots are displayed, but also I made axis scaling more straightforward.

Also, java 1.5 for compatibility with other libraries.

Sincerely,

Roman Krashanitsa
Page Index Toggle Pages: 1