Class TickSettings.TickSettingsBuilder

java.lang.Object
tech.tablesaw.plotly.components.TickSettings.TickSettingsBuilder
Enclosing class:
TickSettings

public static class TickSettings.TickSettingsBuilder extends Object
  • Method Details

    • arrayTicks

      public TickSettings.TickSettingsBuilder arrayTicks(double[] tickValues, String[] tickText)
      Parameters:
      tickValues - Sets the values at which ticks on this axis appear. Only has an effect if `tickmode` is set to "array". Used with `ticktext`.
      tickText - Sets the text displayed at the ticks position via `tickvals`. Only has an effect if `tickmode` is set to "array". Used with `tickvals`.
    • arrayTicks

      public TickSettings.TickSettingsBuilder arrayTicks(double[] tickValues)
    • placement

    • nTicks

      public TickSettings.TickSettingsBuilder nTicks(int nTicks)
      Specifies the maximum number of ticks for the particular axis. The actual number of ticks will be chosen automatically to be less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto".
      Parameters:
      nTicks - a non-negative int
      Returns:
      this builder
    • tickMode

    • showTickLabels

      public TickSettings.TickSettingsBuilder showTickLabels(boolean showTickLabels)
      Determines whether or not the tick labels are drawn.
    • color

      public TickSettings.TickSettingsBuilder color(String tickColor)
      Sets the tick color
    • font

      Sets the tick font
    • width

      public TickSettings.TickSettingsBuilder width(int tickWidth)
      Sets the tick width (in px).
      Parameters:
      tickWidth - number greater than or equal to 0
    • length

      public TickSettings.TickSettingsBuilder length(int tickLength)
      Sets the tick length (in px).
      Parameters:
      tickLength - number greater than or equal to 0
    • autoMargin

      public TickSettings.TickSettingsBuilder autoMargin(boolean adjust)
      Determines whether long tick labels automatically grow the figure margins.
    • separateThousands

      public TickSettings.TickSettingsBuilder separateThousands(boolean separate)
    • showSuffix

    • showExponent

      public TickSettings.TickSettingsBuilder showExponent(TickSettings.DisplayRules showExponent)
    • exponentFormat

      If "all", all exponents are shown besides their significands. If "first", only the exponent of the first tick is shown. If "last", only the exponent of the last tick is shown. If "none", no exponents appear.
    • showPrefix

      If "all", all tick labels are displayed with a prefix. If "first", only the first tick is displayed with a prefix. If "last", only the last tick is displayed with a prefix. If "none", tick prefixes are hidden.
    • mirror

      Determines if the axis lines or/and ticks are mirrored to the opposite side of the plotting area. If "True", the axis lines are mirrored. If "ticks", the axis lines and ticks are mirrored. If "False", mirroring is disable. If "all", axis lines are mirrored on all shared-axes subplots. If "allticks", axis lines and ticks are mirrored on all shared-axes subplots.
    • angle

      public TickSettings.TickSettingsBuilder angle(int angle)
      Sets the angle of the tick labels with respect to the horizontal. For example, a `tickangle` of -90 draws the tick labels vertically.
    • prefix

      public TickSettings.TickSettingsBuilder prefix(String prefix)
    • suffix

      public TickSettings.TickSettingsBuilder suffix(String suffix)
    • tick0

      TODO: this is pretty hack-y. Add a separate method for dealing with dates and maybe clean up logs too

      Sets the placement of the first tick on this axis. Use with `dtick`.

      If the axis `type` is "log", then you must take the log of your starting tick (e.g. to set the starting tick to 100, set the `tick0` to 2) except when `dtick`="L<f>" (see `dtick` for more info).

      If the axis `type` is "date", it should be a date string, like date data.

      If the axis `type` is "category", it should be a number, using the scale where each category is assigned a serial number from zero in the order it appears.

    • dTick

      TODO: this is pretty hack-y. Add a separate method for dealing with dates and maybe clean up logs too

      Sets the step in-between ticks on this axis. Use with `tick0`. Must be a positive number, or special strings available to "log" and "date" axes.

      If the axis `type` is "log", then ticks are set every 10^(n"dtick) where n is the tick number. For example, to set a tick mark at 1, 10, 100, 1000, ... set dtick to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to log_10(5), or 0.69897000433. "log" has several special values; "L<f>", where `f` is a positive number, gives ticks linearly spaced in value (but not position).

      For example `tick0` = 0.1, `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus small digits between, use "D1" (all digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and "D2".

      If the axis `type` is "date", then you must convert the time to milliseconds. For example, to set the interval between ticks to one day, set `dtick` to 86400000.0. "date" also has special values "M<n>" gives ticks spaced by a number of months. `n` must be a positive integer. To set ticks on the 15th of every third month, set `tick0` to "2000-01-15" and `dtick` to "M3". To set ticks every 4 years, set `dtick` to "M48"

    • build

      public TickSettings build()