Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plot2DPanel.addLinePlot plots double[] x, double[] y plots differently depending on length of array #5

Open
GoogleCodeExporter opened this issue Mar 14, 2015 · 7 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Plot2DPanel.addLinePlot("", new double[]{1,2,3}, new double[] {4,5,6})
2. Plot2DPanel.addLinePlot("", new double[]{1,2}, new double[] {4,5})
3.

What is the expected output? What do you see instead?
according to the arguments (String, double[] X, double[] Y), #1 should be 
plotting the follow data points(1,4), (2,5), (3,6) and #2 should plot (1,4) and 
(2,5).

This does not happen for #2. #2 plots (1,2) and (4,5).


What version of the product are you using? On what operating system?
8/2009 download, XP

Please provide any additional information below.


Original issue reported on code.google.com by edhsieh1...@gmail.com on 1 Apr 2011 at 7:46

@GoogleCodeExporter
Copy link
Author

I've also seen this problem when adding multiple line plots to 2D and also 3D 
every now and then.  I'm trying to track down the issue that causes it.  

Currently I would guess it's when the X and Y arrays have only 2 elements.

Original comment by marcus.r...@gmail.com on 13 Sep 2011 at 7:56

@GoogleCodeExporter
Copy link
Author

I believe the problem is here: Plot2DCanvas.convertXY(double[]...XY)

Even though someone clearly coded this intentionally, I think this should be 
removed. It's not documented, and it's not consistent.

Original comment by edhsieh1...@gmail.com on 5 Oct 2011 at 7:22

@GoogleCodeExporter
Copy link
Author

[deleted comment]

1 similar comment
@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

I had also this problem when I was trying to add multiple line plots. I 
experimented a lot with this bug and it only emerges in 2X2 arrays.

Original comment by stavrosi...@gmail.com on 16 Mar 2012 at 5:04

@GoogleCodeExporter
Copy link
Author

Great, I just wasted an entire day trying to trying to figure out why my 
plots/derivations where messed up...

It is indeed because I was throwing 2x2 arrays at addScatterPlot()...

I'd suggest raising the priority level of this issue as plotting a pair of 
points is a rather common elementary test.

Unfortunately, this broke my trust in jmathplot...

Original comment by yse...@gmail.com on 9 Oct 2013 at 2:17

@niddhogg
Copy link

Hey guys, this is indeed a bug, and it's shame such important bug is not fixed yet.
We found a workaround for now to use 2x3 instead of 2x2.
How to do this? Just by duplicating end of line point - it simply works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants