You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
- Plot2DCanvas:
When providing two arrays, one for X and for Y, each of length 2, to the
Plot2DCanvas method "addScatterPlot(String, Color, double[], double[])", then
the columns don't get merged to create an array of x-y pairs, but merely
returned (see method "convertXY" in org.math.plot.canvas.Plot2DCanvas class).
This means that the two arrays, listing x and y separately, get treated
incorrectly as two x-y pairs instead.
- Plot3dCanvas:
When providing three arrays, one for X, one for Y and one for Z, each of length
3, to the Plot3DCanvas method "addScatterPlot(String, Color, double[],
double[], double[])", then the columns don't get merged to create an array of
x-y-z triplets, but merely returned (see method "convertXYZ" in
org.math.plot.canvas.Plot3DCanvas class). This means that the three arrays,
listing x, y and z separately, get treated incorrectly as three x-y-z pairs
instead.
What is the expected output? What do you see instead?
I've attached two source files that solely depend on the jmathplot library.
Both of them will pop up two JFrames, one with the correct display and one with
the incorrect display.
In the 2D case, it is immediately apparent, since the incorrect one displays
the same min/max for the X and Y axes (10-50) instead of X:10-12 and Y:45-47.
And in the 3D case, it is easiest to turn them in such a way, that one looks
onto the X-Y plane (= bird's view). The correct display has the axis ranges
X:10-12 and Y:45-47, the incorrect one X:10-100 and Y:10-200.
What version of the product are you using? On what operating system?
Latest version from subversion/trunk. Linux (Centos 5.5 64-bit). Java 1.6.0_20
64-bit.
Fix:
I've attached a patch file (plot_canvas.patch), generated from the current
trunk in the subversion repository, that fixes this problem.
Original issue reported on code.google.com by fracpete on 28 Jun 2010 at 6:06
Original issue reported on code.google.com by
fracpete
on 28 Jun 2010 at 6:06Attachments:
The text was updated successfully, but these errors were encountered: