I'm having problems to remove Lines from my Plot2DPanel... I used the solution 'draw a line between 2 points' to do the lines in a SCATTER plot...
when I call the removeAllPlots(); method almost everything disappear.. except the lines! hehe
Could somebody say how I can remove these lines?
Thanks.
Hi, maybe you used a Plotable object to add your lines, and not a Plot (like LinePlot) object.
Why don't you use the LinePlot (extends Plot) class ?
I've tried to use LinePlot but I didn't know how to really do this, even consulting the API.
Could you give me an example of LinePlot using some values?
Hi,
in fact you can use linePlot different ways:
double[] x = {1,2,3,4,5}; double[] y = {12,56,84,95,30};
Plot2DPanel plot = new Plot2DPanel(); plot.addLinePlot("my line plot", x, y);
or
double[] xy = {{1,2,3,4,5},{12,56,84,95,30}}; plot.addLinePlot("my line plot", xy);
You just need to use the last version of jmathplot to do this...
Log in to post a comment.
I'm having problems to remove Lines from my Plot2DPanel...
I used the solution 'draw a line between 2 points' to do the lines in a SCATTER plot...
when I call the removeAllPlots(); method almost everything disappear.. except the lines! hehe
Could somebody say how I can remove these lines?
Thanks.
Hi,
maybe you used a Plotable object to add your lines, and not a Plot (like LinePlot) object.
Why don't you use the LinePlot (extends Plot) class ?
I've tried to use LinePlot but I didn't know how to really do this, even consulting the API.
Could you give me an example of LinePlot using some values?
Thanks.
Hi,
in fact you can use linePlot different ways:
double[] x = {1,2,3,4,5};
double[] y = {12,56,84,95,30};
Plot2DPanel plot = new Plot2DPanel();
plot.addLinePlot("my line plot", x, y);
or
double[] xy = {{1,2,3,4,5},{12,56,84,95,30}};
plot.addLinePlot("my line plot", xy);
You just need to use the last version of jmathplot to do this...