Class Plot

java.lang.Object
velo.ladaalpha.misc.Plot

public class Plot extends Object
Simple implementation of plot. Minimal features, no dependencies besides standard libraries. Options are self-descriptive, see also samples.
Author:
Yuriy Guskov
  • Method Details

    • plot

      public static Plot plot(Plot.PlotOptions opts)
      Plot.
      Parameters:
      opts - the opts
      Returns:
      the plot
    • plotOpts

      public static Plot.PlotOptions plotOpts()
      Plot opts.
      Returns:
      the plot options
    • opts

      public Plot.PlotOptions opts()
      Opts.
      Returns:
      the plot options
    • xAxis

      public Plot xAxis(String name, Plot.AxisOptions opts)
      X axis.
      Parameters:
      name - the name
      opts - the opts
      Returns:
      the plot
    • yAxis

      public Plot yAxis(String name, Plot.AxisOptions opts)
      Y axis.
      Parameters:
      name - the name
      opts - the opts
      Returns:
      the plot
    • series

      public Plot series(String name, Plot.Data data, Plot.DataSeriesOptions opts)
      Series.
      Parameters:
      name - the name
      data - the data
      opts - the opts
      Returns:
      the plot
    • series

      public Plot series(String name, Plot.DataSeriesOptions opts)
      Series.
      Parameters:
      name - the name
      opts - the opts
      Returns:
      the plot
    • save

      public void save(String fileName, String type) throws IOException
      Save.
      Parameters:
      fileName - the file name
      type - the type
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • axisOpts

      public static Plot.AxisOptions axisOpts()
      Axis opts.
      Returns:
      the axis options
    • seriesOpts

      public static Plot.DataSeriesOptions seriesOpts()
      Series opts.
      Returns:
      the data series options
    • data

      public static Plot.Data data()
      Data.
      Returns:
      the data
    • formatDouble

      public static String formatDouble(double d, Plot.AxisFormat format)
      Format double.
      Parameters:
      d - the d
      format - the format
      Returns:
      the string