class glue.core.state_objects.StateAttributeLimitsHelper(state, attribute, percentile_subset=10000, cache=None, **kwargs)[source]

Bases: glue.core.state_objects.StateAttributeCacheHelper

This class is a helper for attribute-dependent min/max level values. It is equivalent to AttributeLimitsHelper but operates on State objects and is GUI-independent.


attribute : str

The attribute name - this will be populated once a dataset is assigned to the helper.

percentile_subset : int

How many points to use at most for the percentile calculation (using all values is highly inefficient and not needed)

lower, upper : str

The fields for the lower/upper levels

percentile : QComboBox instance, optional

The scale mode combo - this will be populated by presets such as Min/Max, various percentile levels, and Custom.

log : bool

Whether the limits are in log mode (in which case only positive values are used when finding the limits)


Once the helper is instantiated, the data associated with the helper can be set/changed with:

>>> helper = AttributeLimitsHelper(...)
>>> = data

The data can also be passed to the initializer as described in the list of parameters above.

Attributes Summary


Methods Summary

update_values([force, use_default_modifiers])

Attributes Documentation

modifiers_names = ('log', 'percentile')
values_names = ('lower', 'upper')

Methods Documentation

update_values(force=False, use_default_modifiers=False, **properties)[source]