Menu

how to really remove all plots/plotables

2005-07-26
2013-03-22
  • Nobody/Anonymous

    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.

     
    • Nobody/Anonymous

      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 ?

       
    • fapr

      fapr - 2005-08-03

      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.

       
      • Yann RICHET

        Yann RICHET - 2005-08-03

        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.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.