Class Scatter

  • All Implemented Interfaces:
    IChart

    public class Scatter
    extends Object
    implements IChart
    A simple scatter plotter.
    Author:
    Andrea Antonello (www.hydrologis.com)
    • Field Detail

      • xLabel

        protected String xLabel
      • yLabel

        protected String yLabel
      • dataset

        protected org.jfree.data.xy.XYSeriesCollection dataset
      • xLog

        protected boolean xLog
      • yLog

        protected boolean yLog
      • chart

        protected org.jfree.chart.JFreeChart chart
      • title

        protected String title
    • Constructor Detail

      • Scatter

        public Scatter​(String title)
      • Scatter

        public Scatter()
    • Method Detail

      • addSeries

        public void addSeries​(String seriesName,
                              double[] x,
                              double[] y)
        Add a new series by name and data.
        Parameters:
        seriesName - the name.
        x - the x data array.
        y - the y data array.
      • addSeries

        public void addSeries​(org.jfree.data.xy.XYSeries series)
      • getSeries

        public org.jfree.data.xy.XYSeries getSeries​(String seriesName)
        Get Series to be populated.

        Teh series is added to the dataset.

        Parameters:
        seriesName - the name of the series to add.
        Returns:
        the XYSeries to use.
      • setLogAxes

        public void setLogAxes​(boolean xLog,
                               boolean yLog)
      • setShowLines

        public void setShowLines​(List<Boolean> showLines)
      • setShowShapes

        public void setShowShapes​(List<Boolean> showShapes)
      • setXLabel

        public void setXLabel​(String xLabel)
      • setYLabel

        public void setYLabel​(String yLabel)
      • getImage

        public BufferedImage getImage​(int width,
                                      int height)
      • getChart

        public org.jfree.chart.JFreeChart getChart()
        Specified by:
        getChart in interface IChart
      • setXRange

        public void setXRange​(double min,
                              double max)
      • setYRange

        public void setYRange​(double min,
                              double max)
      • addAnnotation

        public void addAnnotation​(String text,
                                  double x)
      • setColors

        public void setColors​(Color[] colors)