AxisOptions#

Module: exa.core.plotting.plot_options

class AxisOptions(log_scale=False, tick_locator=TickLocator.EXTENDED_WILKINSON, label_formatter=LabelFormatter.SCALAR, tick_count=None, decimal_places=None, label_format=None, percent_scale=None, use_grid=False, lower_limit=None, upper_limit=None)#

Bases: object

Options to customize the appearance of an axis.

Attributes

decimal_places

If label_formatter is exa.core.plotting.plot_styles.LabelFormatter.ENGINEERING, the number of decimal places shown in tick labels.

label_format

If label_formatter is exa.core.plotting.plot_styles.LabelFormatter.STRING, this is used to format each tick label.

label_formatter

Option to select how to format tick labels.

log_scale

Plot this axis on a logarithmic scale.

lower_limit

Lower limit for this axis.

percent_scale

If label_formatter is exa.core.plotting.plot_styles.LabelFormatter.PERCENT, the numbers on an axis are divided by this number before displaying them as percentages.

tick_count

How many ticks to show on the axis.

tick_locator

Option to select how to place tick labels.

upper_limit

Upper limit for this axis.

use_grid

Whether to use background grid for this axis.

Methods

copy

Returns a copy where attributes given in attributes are changed.

Parameters:
log_scale: bool = False#

Plot this axis on a logarithmic scale. Defaults to linear scale.

tick_locator: TickLocator = 4#

Option to select how to place tick labels.

label_formatter: LabelFormatter = 2#

Option to select how to format tick labels.

tick_count: int | None = None#

How many ticks to show on the axis. Defaults to Matplotlib behavior.

decimal_places: int | None = None#

If label_formatter is exa.core.plotting.plot_styles.LabelFormatter.ENGINEERING, the number of decimal places shown in tick labels. Defaults to Matplotlib behavior.

label_format: str | None = None#

If label_formatter is exa.core.plotting.plot_styles.LabelFormatter.STRING, this is used to format each tick label. For example, '{x} ns' writes ‘ns’ after the number in each tick label. Default: no special formatting.

percent_scale: float | None = None#

If label_formatter is exa.core.plotting.plot_styles.LabelFormatter.PERCENT, the numbers on an axis are divided by this number before displaying them as percentages. Default: 1.

use_grid: bool = False#

Whether to use background grid for this axis.

lower_limit: Any | None = None#

Lower limit for this axis.

upper_limit: Any | None = None#

Upper limit for this axis.

copy(**attributes)#

Returns a copy where attributes given in attributes are changed.

Return type:

AxisOptions

Inheritance

Inheritance diagram of exa.core.plotting.plot_options.AxisOptions