Class PlaneSurfaceFactory

    • Field Detail

      • XMIN_KEY

        public static final ConfigKey<java.lang.Double> XMIN_KEY
        Config key for X axis lower bound, before subranging.
      • XMAX_KEY

        public static final ConfigKey<java.lang.Double> XMAX_KEY
        Config key for X axis upper bound, before subranging.
      • XSUBRANGE_KEY

        public static final ConfigKey<Subrange> XSUBRANGE_KEY
        Config key for X axis subrange.
      • YMIN_KEY

        public static final ConfigKey<java.lang.Double> YMIN_KEY
        Config key for Y axis lower bound, before subranging.
      • YMAX_KEY

        public static final ConfigKey<java.lang.Double> YMAX_KEY
        Config key for Y axis upper bound, before subranging.
      • YSUBRANGE_KEY

        public static final ConfigKey<Subrange> YSUBRANGE_KEY
        Config key for Y axis subrange.
      • XLOG_KEY

        public static final ConfigKey<java.lang.Boolean> XLOG_KEY
        Config key for X axis log scale flag.
      • YLOG_KEY

        public static final ConfigKey<java.lang.Boolean> YLOG_KEY
        Config key for Y axis log scale flag.
      • XFLIP_KEY

        public static final ConfigKey<java.lang.Boolean> XFLIP_KEY
        Config key for X axis flip flag.
      • YFLIP_KEY

        public static final ConfigKey<java.lang.Boolean> YFLIP_KEY
        Config key for Y axis flip flag.
      • XLABEL_KEY

        public static final ConfigKey<java.lang.String> XLABEL_KEY
        Config key for X axis text label.
      • YLABEL_KEY

        public static final ConfigKey<java.lang.String> YLABEL_KEY
        Config key for Y axis text label.
      • XYFACTOR_KEY

        public static final ConfigKey<java.lang.Double> XYFACTOR_KEY
        Config key for axis aspect ratio fix.
      • GRID_KEY

        public static final ConfigKey<java.lang.Boolean> GRID_KEY
        Config key to determine if grid lines are drawn.
      • XCROWD_KEY

        public static final ConfigKey<java.lang.Double> XCROWD_KEY
        Config key to control tick mark crowding on X axis.
      • YCROWD_KEY

        public static final ConfigKey<java.lang.Double> YCROWD_KEY
        Config key to control tick mark crowding on Y axis.
      • NAVAXES_KEY

        public static final ConfigKey<boolean[]> NAVAXES_KEY
        Config key to select which axes navigation actions will operate on.
      • XANCHOR_KEY

        public static final ConfigKey<java.lang.Boolean> XANCHOR_KEY
        Config key to anchor X axis during zooms.
      • YANCHOR_KEY

        public static final ConfigKey<java.lang.Boolean> YANCHOR_KEY
        Config key to anchor Y axis during zooms.
    • Constructor Detail

      • PlaneSurfaceFactory

        public PlaneSurfaceFactory()
    • Method Detail

      • getAspectConfig

        public ConfigMap getAspectConfig​(Surface surf)
        Description copied from interface: SurfaceFactory
        Returns a ConfigMap that corresponds to the configuration of the given surface, which must have been created by this factory. The intention is that supplying the returned config items to this object's createAspect method with the right profile should come up with approximately the same surface, preferably without reference to any supplied ranges.

        The returned config items should be optimised for presentation to the user, so that for instance decimal values are reported to a reasonable level of precision. Because of this, and perhaps for other reasons related to implementation, a surface resulting from feeding the returned config back to this factory may not be identical to the supplied surface, so round-tripping is not guaranteed to be exact.

        Specified by:
        getAspectConfig in interface SurfaceFactory<PlaneSurfaceFactory.Profile,​PlaneAspect>
        Parameters:
        surf - plot surface; if it was not created by this factory, behaviour is undefined
        Returns:
        config map populated with items that should approximately reproduce the supplied surface
      • createAxisAnchorKey

        public static ConfigKey<java.lang.Boolean> createAxisAnchorKey​(java.lang.String axname,
                                                                       boolean dflt)
        Creates a config key for determining whether a named axis is to be anchored at a data value of zero.
        Parameters:
        axname - axis name
        dflt - anchor default value
        Returns:
        config key
      • createAxisLimitKey

        public static ConfigKey<java.lang.Double> createAxisLimitKey​(java.lang.String axname,
                                                                     boolean isMax)
        Creates a config key for fixing a minimum or maximum limit for a named axis.
        Parameters:
        axname - axis name
        isMax - true for upper limit, false for lower limit
        Returns:
        new config key
      • createAxisLogKey

        public static ConfigKey<java.lang.Boolean> createAxisLogKey​(java.lang.String axname)
        Creates a config key for determining whether a named Cartesian axis is logarithmic or linear.
        Parameters:
        axname - axis name
        Returns:
        new config key, true for log scaling
      • createAxisFlipKey

        public static ConfigKey<java.lang.Boolean> createAxisFlipKey​(java.lang.String axname)
        Creates a config key for determining whether a named Cartesian axis is to be reversed.
        Parameters:
        axname - axis name
        Returns:
        new config key, true if sense is reversed
      • createAxisSubrangeKey

        public static ConfigKey<Subrange> createAxisSubrangeKey​(java.lang.String axname)
        Creates a config key for selecting a subrange on a named Cartesian axis.
        Parameters:
        axname - axis name
        Returns:
        new config key
      • createAxisCrowdKey

        public static ConfigKey<java.lang.Double> createAxisCrowdKey​(java.lang.String axname)
        Creates a config key for determining tickmark crowding on a named axis.
        Parameters:
        axname - axis name
        Returns:
        new config key for dimensionless crowding figure
      • getLimits

        public static double[] getLimits​(ConfigMap config,
                                         ConfigKey<java.lang.Double> minKey,
                                         ConfigKey<java.lang.Double> maxKey,
                                         ConfigKey<Subrange> subrangeKey,
                                         boolean isLog,
                                         Range range)
        Utility method to interrogate axis range configuration variables and work out the actual range to use on a given Cartesian axis. If not enough information is supplied to determine the definite range, null is returned.
        Parameters:
        config - config map containing config values
        minKey - config key giving axis lower bound before subranging
        maxKey - config key giving axis upper bound before subranging
        subrangeKey - config key giving subrange value
        isLog - true for logarithmic axis, false for linear
        range - data range on axis; may be partially populated or null
        Returns:
        2-element array giving definite axis (lower,upper) bounds, or null
      • getLimits

        public static double[] getLimits​(double lo,
                                         double hi,
                                         Subrange subrange,
                                         boolean isLog,
                                         Range range)
        Utility method to determine actual axis limits based on requested high/low values and a subrange. If not enough information is supplied to determine the definite range, null is returned.
        Parameters:
        lo - requested lower bound before subranging, may be NaN
        hi - requested upper bound before subranging, may be NaN
        subrange - requested subrange
        isLog - true for logarithmic axis, false for linear
        range - actual data range on axis; may be partially populated or null
        Returns:
        2-element array giving definite axis (lower,upper) bounds, or null