File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Threads and Synchronization and the fly likes Plot update error - JMathPlot Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Threads and Synchronization
Reply Bookmark "Plot update error - JMathPlot" Watch "Plot update error - JMathPlot" New topic
Author

Plot update error - JMathPlot

Richard Woodward
Greenhorn

Joined: Jan 28, 2010
Posts: 3

I'm using the JMathPlot library to produce a simple graph, in this case it's a 3D which is updated for every iteration in the for loop. However, the speed in which it loops I'm getting:



and



Which to my understanding is something to do with the AWT thread and the main thread not getting along. I know that I need to update the graphic thread in a special way, just not sure how. Here is my code, if anyone could suggest how I update the plot (repaint, I guess) without the error, that would be great.


Steve Luke
Bartender

Joined: Jan 28, 2003
Posts: 1900

It looks like you have to build the plot (call the plot.addGridPlot(...) methods) prior to trying to display it.


Steve
 
 
subject: Plot update error - JMathPlot
 
Threads others viewed
Garbage collection
Array overwritten
need help again
How do I handle "The Matrix" ?
How to plot a graph in Java ?
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture