Class ContourPlotExtendedData.UnitPlot<U extends Unit<U>,Z extends org.djunits.value.vdouble.scalar.base.DoubleScalarRel<U,Z>>

Type Parameters:
U - unit type
Z - unit value type
All Implemented Interfaces:
Identifiable, org.jfree.data.general.Dataset, org.jfree.data.general.SeriesDataset, org.jfree.data.xy.XYDataset, org.jfree.data.xy.XYZDataset
Enclosing class:
ContourPlotExtendedData<Z extends Number>

public static class ContourPlotExtendedData.UnitPlot<U extends Unit<U>,Z extends org.djunits.value.vdouble.scalar.base.DoubleScalarRel<U,Z>> extends ContourPlotExtendedData<Z>
Extension of ContourPlotExtendedData for DJUNITS data types. The legend format will be "%.1f{unit}". The label format will be "{quantity} %.2f {unit}". A last digit in the unit will be made in to a superscript.
  • Constructor Details

    • UnitPlot

      public UnitPlot(String caption, ContourDataSource source, ExtendedDataNumber<?> extendedDataType, AbstractContourPlot.Bounds<Z> bounds, Z legendStep, U unit)
      Constructor with default paint scale (red at minimum, yellow at mid-point, green at maximum).
      Parameters:
      caption - caption
      source - data source
      extendedDataType - extended data type
      bounds - paint scale bounds
      legendStep - legend step
      unit - unit to display values in
    • UnitPlot

      public UnitPlot(String caption, ContourDataSource source, ExtendedDataNumber<?> extendedDataType, BoundsPaintScale paintScale, Z legendStep, U unit)
      Constructor with specified paint scale.
      Parameters:
      caption - caption
      source - data source
      extendedDataType - extended data type
      paintScale - paint scale
      legendStep - legend step
      unit - unit to display values in
  • Method Details

    • scale

      protected double scale(double si)
      Description copied from class: AbstractContourPlot
      Scale the z-value from SI to the desired unit for users, in line with unit in AbstractContourPlot.LabelData.labelFormat.
      Overrides:
      scale in class ContourPlotExtendedData<Z extends org.djunits.value.vdouble.scalar.base.DoubleScalarRel<U,Z>>
      Parameters:
      si - SI value
      Returns:
      scaled value