Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

offset text still visible with ImageGrid axis "L" #16895

Copy link
Copy link
Closed
@zingale

Description

@zingale
Issue body actions

Bug report

If I use an "L" configuration for the ImageGrid label_mode, then the offset text on axes still appears for all axes, even though the tick labels themselves are not present. The "L" mode should disable the offset text where appropriate.

Code for reproduction

import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid1 import ImageGrid
import numpy as np

im1 = np.arange(100).reshape((10, 10))
im2 = im1.T
im3 = np.flipud(im1)
im4 = np.fliplr(im2)

fig = plt.figure(figsize=(4., 4.))
grid = ImageGrid(fig, 111,  # similar to subplot(111)
                 nrows_ncols=(2, 2),  # creates 2x2 grid of axes
                 label_mode="L",
                 axes_pad=0.2,  # pad between axes in inch.
                 )

for ax, im in zip(grid, [im1, im2, im3, im4]):
    # Iterating over the grid returns the Axes.
    ax.imshow(im, extent=[0, 1.e8, 0, 1.e8])

plt.savefig("test.png")

Actual outcome

test

# If applicable, paste the console output here
#
#

Expected outcome

The 10^8 offset text on the x-axis of the upper left axes, the x- and y- on the upper right, and the y on the lower right should not be display.

Matplotlib version

  • Operating system: Fedora 31
  • Matplotlib version: 3.2.1
  • Matplotlib backend (print(matplotlib.get_backend())): Qt5Agg
  • Python version: 3.7.6
  • Jupyter version (if applicable): N/A
  • Other libraries:

matplotlib installed via pip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.