Class CurveSpec

java.lang.Object
edu.cnu.mdi.splot.io.CurveSpec

public final class CurveSpec extends Object
Persisted curve record: supports XY(E) and H1D via histo block.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    The method to use for drawing the curve, such as straight lines, splines, or no curve (just points).
    double[]
    The error values corresponding to the x and y values.
    int
    The order of the fit to apply to the curve, if any.
    The histogram specification for this curve, if it represents a histogram.
    Legacy location for a 2D histogram specification.
    The curve name, used for legends and such.
    The style to use for drawing the curve, such as color, line width, and point shape.
    boolean
    Whether the curve is visible.
    double[]
    The data points for the curve.
    double[]
    The y values corresponding to the x values.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • name

      public String name
      The curve name, used for legends and such.
    • visible

      public boolean visible
      Whether the curve is visible. This is persisted so that it can be toggled on and off in the UI and remembered across sessions.
    • drawingMethod

      public CurveDrawingMethod drawingMethod
      The method to use for drawing the curve, such as straight lines, splines, or no curve (just points).
    • fitOrder

      public int fitOrder
      The order of the fit to apply to the curve, if any. This is relevant when drawingMethod specifies a fitting method.
    • style

      public StyleSpec style
      The style to use for drawing the curve, such as color, line width, and point shape. This is persisted so that the curve can be rendered consistently across sessions.
    • x

      public double[] x
      The data points for the curve. For XY(E) curves, x and y are the coordinates of the points, and e is the error (if applicable). For H1D curves, x and y may represent bin centers and counts, respectively, and e may represent uncertainties in the counts.
    • y

      public double[] y
      The y values corresponding to the x values. For XY(E) curves, these are the y coordinates of the points. For H1D curves, these may represent the counts in each bin.
    • e

      public double[] e
      The error values corresponding to the x and y values. For XY(E) curves, these represent the uncertainties in the y values. For H1D curves, these may represent the uncertainties in the counts. This field is optional and may be null if no error information is available.
    • histo

      public HistoSpec histo
      The histogram specification for this curve, if it represents a histogram. For XY(E) curves, this may be null. For H1D curves, this may contain information about the binning and other histogram properties.
    • histo2d

      public Histo2DSpec histo2d
      Legacy location for a 2D histogram specification.

      Current saves always place H2D data on PlotSpec.histo2d instead; PlotIO only reads this field as a backward-compatible fallback when loading an older file that stored the heatmap here (on curves[0]) rather than at the top level. New code should not populate this field.

  • Constructor Details

    • CurveSpec

      public CurveSpec()