Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC : add prominent doc about set_useOffset #3168

Merged
merged 1 commit into from Jun 30, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 11 additions & 0 deletions doc/faq/howto_faq.rst
Expand Up @@ -39,6 +39,17 @@ You can also filter on class instances::
o.set_fontstyle('italic')


.. _howto-supress_offset:
How to prevent ticklabels from having an offset
-----------------------------------------------
The default formatter will use an offset to reduce
the length of the ticklabels. To turn this feature
off::
ax.get_xaxis().get_major_formatter().set_useOffset(False)

or use a different formatter. See :mod:`~matplotlib.ticker`
for details.

.. _howto-transparent:

Save transparent figures
Expand Down
19 changes: 19 additions & 0 deletions lib/matplotlib/ticker.py
Expand Up @@ -9,6 +9,25 @@
as well as domain specific custom ones..


Default Formatter
-----------------

The default formatter identifies when the x-data being
plotted is a small range on top of a large off set. To
reduce the chances that the ticklabels overlap the ticks
are labeled as deltas from a fixed offset. For example::

ax.plot(np.arange(2000, 2010), range(10))

will have tick of 0-9 with an offset of +2e3. If this
is not desired turn off the use of the offset on the default
formatter::


ax.get_xaxis().get_major_formatter().set_useOffset(False)

or set a different formatter.

Tick locating
-------------

Expand Down