Class ScatterPlot

  • All Implemented Interfaces:
    Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, QuickInfoSupporter, SizeOfHandler, ColorProviderHandler, Serializable

    public class ScatterPlot
    extends AbstractXYChartGenerator
    Generates a scatter plot by plotting the X column against one or more Y columns.

    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -width <int> (property: width)
        The width of the chart dialog.
        default: 800
        minimum: -1
     
    -height <int> (property: height)
        The height of the chart dialog.
        default: 600
        minimum: -1
     
    -row-finder <adams.data.spreadsheet.rowfinder.RowFinder> (property: rowFinder)
        The row finder to use for restricting the rows used for the chart.
        default: adams.data.spreadsheet.rowfinder.ByIndex
     
    -x-column <java.lang.String> (property: XColumn)
        The index of the (optional) column which values to use on the X axis; if 
        no column provided, the row index is used instead; An index is a number 
        starting with 1; column names (case-sensitive) as well as the following 
        placeholders can be used: first, second, third, last_2, last_1, last; numeric 
        indices can be enforced by preceding them with '#' (eg '#12'); column names 
        can be surrounded by double quotes.
        default: 
     
    -y-columns <java.lang.String> (property: YColumns)
        The range of columns to use on the Y axis; A range is a comma-separated 
        list of single 1-based indices or sub-ranges of indices ('start-end'); '
        inv(...)' inverts the range '...'; column names (case-sensitive) as well 
        as the following placeholders can be used: first, second, third, last_2, 
        last_1, last; numeric indices can be enforced by preceding them with '#' 
        (eg '#12'); column names can be surrounded by double quotes.
        default: 
     
    -color-provider <adams.gui.visualization.core.AbstractColorProvider> (property: colorProvider)
        The color provider to use.
        default: adams.gui.visualization.core.DefaultColorProvider
     
    -plot-type <CIRCLE|CROSS> (property: plotType)
        The plot type to use.
        default: CIRCLE
     
    -diameter <int> (property: diameter)
        The diameter of the circle/cross in pixels (if no error data supplied).
        default: 7
        minimum: 1
     
    -overlay-paintlet <adams.gui.visualization.sequence.XYSequencePaintlet> (property: overlayPaintlet)
        The paintlet to use for painting the overlay data (if any).
        default: adams.gui.visualization.sequence.NullPaintlet
     
    Version:
    $Revision$
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_Diameter

        protected int m_Diameter
        the diameter.
      • m_OverlayPaintlet

        protected XYSequencePaintlet m_OverlayPaintlet
        the overlay paintlet to use for painting the overlays.
    • Constructor Detail

      • ScatterPlot

        public ScatterPlot()
    • Method Detail

      • setPlotType

        public void setPlotType​(ScatterPlot.PlotType value)
        Sets the plot type.
        Parameters:
        value - the type
      • plotTypeTipText

        public String plotTypeTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setDiameter

        public void setDiameter​(int value)
        Sets the circle/cross diameter.
        Parameters:
        value - the diameter
      • getDiameter

        public int getDiameter()
        Returns the diameter of the circle/cross.
        Returns:
        the diameter
      • diameterTipText

        public String diameterTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setOverlayPaintlet

        public void setOverlayPaintlet​(XYSequencePaintlet value)
        Sets the overlay paintlet to use.
        Parameters:
        value - the paintlet
      • getOverlayPaintlet

        public XYSequencePaintlet getOverlayPaintlet()
        Returns the overlay paintlet to use.
        Returns:
        the paintlet
      • overlayPaintletTipText

        public String overlayPaintletTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • addChartGeneration

        protected void addChartGeneration​(Flow flow,
                                          String name,
                                          SpreadSheet sheet)
        Adds the chart generation to the flow. The flow already contains forwarding of spreadsheet and selecting subset of rows.
        Overrides:
        addChartGeneration in class AbstractRowBasedChartGenerator
        Parameters:
        flow - the flow to extend
        name - the name of the tab/sheet
        sheet - the spreadsheet to generate the flow for