Documentation of 'de.erichseifert.gral.plots.XYPlot' Java class
XYPlot
de.erichseifert.gral.plots

Class XYPlot

    • Field Detail

      • AXIS_X

        public static final java.lang.String AXIS_X
        Key for specifying the x-axis of an xy-plot.
        See Also:
        Constant Field Values
      • AXIS_X2

        public static final java.lang.String AXIS_X2
        Key for specifying the secondary x-axis of an xy-plot.
        See Also:
        Constant Field Values
      • AXIS_Y

        public static final java.lang.String AXIS_Y
        Key for specifying the y-axis of an xy-plot.
        See Also:
        Constant Field Values
      • AXIS_Y2

        public static final java.lang.String AXIS_Y2
        Key for specifying the secondary y-axis of an xy-plot.
        See Also:
        Constant Field Values
    • Constructor Detail

      • XYPlot

        public XYPlot(DataSource... data)
        Initializes a new instance object with the specified data sources and reasonable default settings.
        Parameters:
        data - Data to be displayed.
    • Method Detail

      • getPointRenderers

        public java.util.List<PointRenderer> getPointRenderers(DataSource s)
        Returns all PointRenderers that display the data of the specified data source.
        Parameters:
        s - Data source in question.
        Returns:
        Renderers being applied on the specified data source.
      • addPointRenderer

        public void addPointRenderer(DataSource s,
                                     PointRenderer pointRenderer)
        Adds a PointRenderer for the specified data source.
        Parameters:
        s - Data to be rendered.
        pointRenderer - PointRenderer to be used.
      • removePointRenderer

        public void removePointRenderer(DataSource s,
                                        PointRenderer pointRenderer)
        Decouples the specified PointRenderer from the rendering of the specified data source.
        Parameters:
        s - Data to be rendered no longer.
        pointRenderer - PointRenderer to be removed.
      • setPointRenderers

        public void setPointRenderers(DataSource s,
                                      java.util.List<PointRenderer> pointRenderers)
        Sets the PointRenderers for a certain data source to the specified value.
        Parameters:
        s - Data source.
        pointRenderers - PointRenderers to be set.
      • setPointRenderers

        public void setPointRenderers(DataSource s,
                                      PointRenderer pointRendererFirst,
                                      PointRenderer... pointRenderers)
        Sets the PointRenderers for a certain data source to the specified value.
        Parameters:
        s - Data source.
        pointRendererFirst - First PointRenderer.
        pointRenderers - Remaining PointRenderers to be set.
      • getLineRenderers

        public java.util.List<LineRenderer> getLineRenderers(DataSource s)
        Returns all LineRenderers that display the data of the specified data source.
        Parameters:
        s - Data source in question.
        Returns:
        Renderers being applied on the specified data source.
      • setLineRenderers

        public void setLineRenderers(DataSource s,
                                     java.util.List<LineRenderer> lineRenderers)
        Sets the LineRenderers for a certain data source to the specified value.
        Parameters:
        s - Data source.
        lineRenderers - LineRenderers to be set.
      • setLineRenderers

        public void setLineRenderers(DataSource s,
                                     LineRenderer lineRendererFirst,
                                     LineRenderer... lineRenderers)
        Sets the LineRenderers for a certain data source to the specified value.
        Parameters:
        s - Data source.
        lineRendererFirst - First LineRenderer to be set.
        lineRenderers - Remaining LineRenderers to be set.
      • getAreaRenderers

        public java.util.List<AreaRenderer> getAreaRenderers(DataSource s)
        Returns all AreaRenderers for the specified data source.
        Parameters:
        s - Data source.
        Returns:
        AreaRenderers used to render the DataSource.
      • setAreaRenderers

        public void setAreaRenderers(DataSource s,
                                     java.util.List<AreaRenderer> areaRenderers)
        Sets the AreaRenderers for a certain data source to the specified value.
        Parameters:
        s - Data source.
        areaRenderers - AreaRenderers to be set.
      • setAreaRenderers

        public void setAreaRenderers(DataSource s,
                                     AreaRenderer areaRendererFirst,
                                     AreaRenderer... areaRenderers)
        Sets the AreaRenderers for a certain data source to the specified value.
        Parameters:
        s - Data source.
        areaRendererFirst - First AreaRenderer to be set.
        areaRenderers - Remaining AreaRenderers to be set.
      • setAxisRenderer

        public void setAxisRenderer(java.lang.String axisName,
                                    AxisRenderer renderer)
        Description copied from class: AbstractPlot
        Sets the renderer for the axis with the specified name.
        Specified by:
        setAxisRenderer in interface Plot
        Overrides:
        setAxisRenderer in class AbstractPlot
        Parameters:
        axisName - Name of the axis to be rendered.
        renderer - Instance to render the axis.
      • add

        public void add(int index,
                        DataSource source,
                        boolean visible)
        Description copied from class: AbstractPlot
        Inserts the specified data series to the plot at a specified position.
        Specified by:
        add in interface Plot
        Overrides:
        add in class AbstractPlot
        Parameters:
        index - Position.
        source - Data series.
        visible - true if the series should be displayed, false otherwise.
      • getNavigator

        public Navigator getNavigator()
        Returns a navigator instance that can control the current object.
        Specified by:
        getNavigator in interface Navigable
        Returns:
        A navigator instance.
      • draw

        public void draw(DrawingContext context)
        Description copied from class: AbstractPlot
        Draws the Drawable with the specified drawing context.
        Specified by:
        draw in interface Drawable
        Overrides:
        draw in class AbstractPlot
        Parameters:
        context - Environment used for drawing
      • rangeChanged

        public void rangeChanged(Axis axis,
                                 java.lang.Number min,
                                 java.lang.Number max)
        Notified if the range of an axis has changed.
        Specified by:
        rangeChanged in interface AxisListener
        Parameters:
        axis - Axis instance that has changed.
        min - New minimum value.
        max - New maximum value.

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.