Skip to content

tick_right() doesn't move scale factor #4043

Closed

Description

@duncanmmacleod

The YAxis.tick_right() method doesn't move a scale factor when the formatter introduces one. The following minimal example should demonstrate that:

import numpy
from matplotlib import pyplot
data = numpy.random.random(1e4) * 1e-22
fig, axes = pyplot.subplots(2, 1, sharex=True)
axes[0].plot(data)
axes[1].plot(data ** (.5))
axes[1].yaxis.set_label_position('right')
axes[1].yaxis.tick_right()

tick_right

The 1e-11 factor should ideally be on the right-hand-side with the tick labels.

Activity

  1. added this to the v1.4.x milestone on Jan 28, 2015
  2. WeatherGod commented on Jan 29, 2015

    @WeatherGod
    Member

    Hmm, that's a bit odd. If I recall correctly, the offset/scale text is
    moved to the right whenever we use twinx().

    On Tue, Jan 27, 2015 at 7:20 PM, Duncan Macleod notifications@github.com
    wrote:

    The YAxis.tick_right()
    http://matplotlib.org/api/axis_api.html#matplotlib.axis.YAxis.tick_right
    method doesn't move a scale factor when the formatter introduces one. The
    following minimal example should demonstrate that:

    import numpyfrom matplotlib import pyplot
    data = numpy.random.random(1e4) * 1e-22
    fig, axes = pyplot.subplots(2, 1, sharex=True)
    axes[0].plot(data)
    axes[1].plot(data ** (.5))
    axes[1].yaxis.set_label_position('right')
    axes[1].yaxis.tick_right()

    [image: tick_right]
    https://cloud.githubusercontent.com/assets/1618530/5930102/c91db7fc-a650-11e4-931e-ac6013b4abe7.png

    The 1e-11 factor should ideally be on the right-hand-side with the tick
    labels.

    —
    Reply to this email directly or view it on GitHub
    #4043.

  3. modified the milestones: v1.4.x, on Feb 7, 2015
  4. added a commit that references this issue on Mar 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions