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

Interface Plot

    • Method Detail

      • getAxis

        Axis getAxis(java.lang.String name)
        Returns the axis with the specified name.
        Parameters:
        name - Name of the axis.
        Returns:
        Axis.
      • setAxis

        void setAxis(java.lang.String name,
                     Axis axis)
        Sets the axis with the specified name and the associated AxisRenderer.
        Parameters:
        name - Name of the axis.
        axis - Axis.
      • removeAxis

        void removeAxis(java.lang.String name)
        Removes the axis with the specified name.
        Parameters:
        name - Name of the axis to be removed.
      • getAxesNames

        java.util.Collection<java.lang.String> getAxesNames()
        Returns a collection of all names of the axes stored in this plot.
        Returns:
        The names of all axes stored in this plot.
      • autoscaleAxis

        void autoscaleAxis(java.lang.String axisName)
        Tries to automatically set the ranges of the axes specified by the name if it is set to auto-scale.
        Parameters:
        axisName - Name of the axis that should be scaled.
        See Also:
        Axis.setAutoscaled(boolean)
      • getAxisRenderer

        AxisRenderer getAxisRenderer(java.lang.String axisName)
        Returns the renderer for the axis with the specified name.
        Parameters:
        axisName - Axis name.
        Returns:
        Instance that renders the axis.
      • setAxisRenderer

        void setAxisRenderer(java.lang.String axisName,
                             AxisRenderer renderer)
        Sets the renderer for the axis with the specified name.
        Parameters:
        axisName - Name of the axis to be rendered.
        renderer - Instance to render the axis.
      • getPlotArea

        PlotArea getPlotArea()
        Returns the drawing area of this plot.
        Returns:
        PlotArea2D.
      • getTitle

        Label getTitle()
        Returns the title component of this plot.
        Returns:
        Label representing the title.
      • getLegend

        Legend getLegend()
        Returns the legend component.
        Returns:
        Legend.
      • add

        void add(DataSource source)
        Adds a new data series to the plot which is visible by default.
        Parameters:
        source - Data series.
      • add

        void add(DataSource source,
                 boolean visible)
        Adds a new data series to the plot.
        Parameters:
        source - Data series.
        visible - true if the series should be displayed, false otherwise.
      • add

        void add(int index,
                 DataSource source,
                 boolean visible)
        Inserts the specified data series to the plot at a specified position.
        Parameters:
        index - Position.
        source - Data series.
        visible - true if the series should be displayed, false otherwise.
      • contains

        boolean contains(DataSource source)
        Returns whether the plot contains the specified data series.
        Parameters:
        source - Data series.
        Returns:
        true if the specified element is stored in the plot, otherwise false
      • get

        DataSource get(int index)
        Returns the data series at a specified index.
        Parameters:
        index - Position of the data series.
        Returns:
        Instance of the data series.
      • remove

        boolean remove(DataSource source)
        Deletes the specified data series from the plot.
        Parameters:
        source - Data series.
        Returns:
        true if the series existed, otherwise false.
      • clear

        void clear()
        Removes all data series from this plot.
      • getMapping

        java.lang.String[] getMapping(DataSource source)
        Returns the mapping of data source columns to axis names. The elements of returned array equal the column indexes, i.e. the first element (axis name) matches the first column of source. If no mapping exists null will be stored in the array.
        Parameters:
        source - Data source.
        Returns:
        Array containing axis names in the order of the columns, or null if no mapping exists for the column.
      • setMapping

        void setMapping(DataSource source,
                        java.lang.String... axisNames)
        Sets the mapping of data source columns to axis names. The column index is taken from the order of the axis names, i.e. the first column of source will be mapped to first element of axisNames. Axis names with value null will be ignored.
        Parameters:
        source - Data source.
        axisNames - Sequence of axis names in the order of the columns.
      • getData

        java.util.List<DataSource> getData()
        Returns a list of all data series stored in the plot.
        Returns:
        List of all data series.
      • getVisibleData

        java.util.List<DataSource> getVisibleData()
        Returns a list of all visible data series stored in the plot.
        Returns:
        List of all visible data series.
      • isVisible

        boolean isVisible(DataSource source)
        Returns whether the specified data series is drawn.
        Parameters:
        source - Data series.
        Returns:
        true if visible, false otherwise.
      • setVisible

        void setVisible(DataSource source,
                        boolean visible)
        Changes the visibility of the specified data series.
        Parameters:
        source - Data series.
        visible - true if the series should be visible, false otherwise.
      • getBackground

        java.awt.Paint getBackground()
        Returns the paint which is used to fill the background of the plot.
        Returns:
        Paint which is used to fill the background of the plot.
      • setBackground

        void setBackground(java.awt.Paint background)
        Sets the paint which will be used to fill the background of the plot.
        Parameters:
        background - Paint which will be used to fill the background of the plot.
      • getBorderStroke

        java.awt.Stroke getBorderStroke()
        Returns the stroke which is used to paint the border of the plot.
        Returns:
        Stroke which is used to paint the border of the plot.
      • setBorderStroke

        void setBorderStroke(java.awt.Stroke border)
        Sets the stroke which will be used to paint the border of the plot.
        Parameters:
        border - Stroke which will be used to paint the border of the plot.
      • getBorderColor

        java.awt.Paint getBorderColor()
        Returns the paint which is used to fill the border of the plot.
        Returns:
        Paint which is used to fill the border of the plot.
      • setBorderColor

        void setBorderColor(java.awt.Paint color)
        Sets the paint which will be used to fill the border of the plot.
        Parameters:
        color - Paint which will be used to fill the border of the plot.
      • getFont

        java.awt.Font getFont()
        Returns the base font used by the plot.
        Returns:
        Font used by the plot.
      • setFont

        void setFont(java.awt.Font font)
        Sets the base font that will be used by the plot.
        Parameters:
        font - Font that will used by the plot.
      • isLegendVisible

        boolean isLegendVisible()
        Returns whether the legend is shown.
        Returns:
        true if the legend is shown, false if the legend is hidden.
      • setLegendVisible

        void setLegendVisible(boolean legendVisible)
        Sets whether the legend will be shown.
        Parameters:
        legendVisible - true if the legend should be shown, false if the legend should be hidden.
      • getLegendLocation

        Location getLegendLocation()
        Returns the current positioning of the legend inside the plot.
        Returns:
        Current positioning of the legend inside the plot.
      • setLegendLocation

        void setLegendLocation(Location location)
        Sets the positioning of the legend inside the plot.
        Parameters:
        location - Positioning of the legend inside the plot.
      • getLegendDistance

        double getLegendDistance()
        Returns the spacing between the plot area and the legend.
        Returns:
        Spacing between the plot area and the legend relative to font height.
      • setLegendDistance

        void setLegendDistance(double distance)
        Sets the spacing between the plot area and the legend. The distance is defined in font height.
        Parameters:
        distance - Spacing between the plot area and the legend relative to font height.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.