jmathplot
jmathplot copied to clipboard
Histogram constantly redraws, using 100% CPU
What steps will reproduce the problem?
1. Run the histogram example from the wiki
2. Notice that it is consuming an entire CPU core...
What is the expected output? What do you see instead?
It shouldn't be constantly redrawing
What version of the product are you using? On what operating system?
Latest code from SVN
Please provide any additional information below.
It looks like the problem is that HistogramPlot2D.plot() calls:
draw.canvas.includeInBounds(bottomLeft[0]);
draw.canvas.includeInBounds(topRight[XY.length - 1]);
..which in turn call repaint() and force a redraw of the chart, hence looping
infinitely.
Skim-reading the code, I guess the same applies to ClodPlot2D and 3D too.
Original issue reported on code.google.com by [email protected] on 8 Aug 2010 at 10:21
Patch to stop includeInBounds() methods always redrawing.
Original comment by [email protected] on 8 Aug 2010 at 10:40
Attachments:
That patch worked beautifully for me. Thanks!
Original comment by [email protected] on 27 Oct 2011 at 1:20