mpl.pyplot.IndexLocator¶
-
class
mpl.pyplot.IndexLocator(base, offset)[source]¶ Place a tick on every multiple of some base number of points plotted, e.g., on every 5th point. It is assumed that you are doing index plotting; i.e., the axis is 0, len(data). This is mainly useful for x ticks.
Methods¶
__init__(base, offset) |
place ticks on the i-th data points where (i-offset)%base==0 |
autoscale() |
autoscale the view limits |
create_dummy_axis(**kwargs) |
|
pan(numsteps) |
Pan numticks (can be positive or negative) |
raise_if_exceeds(locs) |
raise a RuntimeError if Locator attempts to create more than |
refresh() |
refresh internal information based on current lim |
set_axis(axis) |
|
set_bounds(vmin, vmax) |
|
set_data_interval(vmin, vmax) |
|
set_params([base, offset]) |
Set parameters within this locator |
set_view_interval(vmin, vmax) |
|
tick_values(vmin, vmax) |
|
view_limits(vmin, vmax) |
select a scale for the range from vmin to vmax |
zoom(direction) |
Zoom in/out on axis; if direction is >0 zoom in, else zoom out |