GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Installation
  • Documentation
  • Examples
  • Tutorials
  • Contributing

This view

  • Original page
  • New address

GeezerVison is showing matplotlib.org — matplotlib.pyplot.locator_params — Matplotlib 3.1.2 documentation

You are reading an old version of the documentation (v3.1.1). For the latest version see https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.locator_params.html
Version 3.1.2
matplotlib
Fork me on GitHub

Navigation

  • index
  • modules |
  • next |
  • previous |
  • home| 
  • contents »
  • API Overview »
  • matplotlib.pyplot »
  • matplotlib.pyplot »

Quick search

Related Topics

  • Documentation overview
    • API Overview
      • matplotlib.pyplot
        • matplotlib.pyplot
          • Previous: matplotlib.pyplot.legend
          • Next: matplotlib.pyplot.loglog
Show Page Source

matplotlib.pyplot.locator_params¶

matplotlib.pyplot.locator_params(axis='both', tight=None, **kwargs)[source]¶

Control behavior of major tick locators.

Because the locator is involved in autoscaling, autoscale_view is called automatically after the parameters are changed.

Parameters:
axis : {'both', 'x', 'y'}, optional

The axis on which to operate.

tight : bool or None, optional

Parameter passed to autoscale_view. Default is None, for no change.

Other Parameters:
**kwargs

Remaining keyword arguments are passed to directly to the set_params() method of the locator. Supported keywords depend on the type of the locator. See for example set_params for the ticker.MaxNLocator used by default for linear axes.

Examples

When plotting small subplots, one might want to reduce the maximum number of ticks and use tight bounds, for example:

ax.locator_params(tight=True, nbins=4)
© Copyright 2002 - 2012 John Hunter, Darren Dale, Eric Firing, Michael Droettboom and the Matplotlib development team; 2012 - 2018 The Matplotlib development team.
Last updated on Jan 05, 2020. Created using Sphinx 1.8.5. Doc version v3.1.1-79-g90d53b526.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.