Skip to content

[Bug]: Cannot change xlabel after drawing custom axes with xlabel #31288

@williamlus

Description

@williamlus

Bug summary

This bug occurs when I set xlabel of axisartist.Axes to some non-empty string, and draw the figure, but when I set the xlabel to another string, the figure does not change.

Code for reproduction

import matplotlib.pyplot as plt
import mpl_toolkits.axisartist as axisartist

fig = plt.figure()
ax = fig.add_subplot(axes_class=axisartist.Axes)
ax.axis["top"].set_visible(False)
ax.axis["right"].set_visible(False)

ax.set_xlabel("first label")
fig.draw_without_rendering()
ax.set_xlabel("second label")
plt.show()

Actual outcome

Image

Expected outcome

Image

Additional information

No response

Operating system

No response

Matplotlib Version

0.2.0.dev53848+unknown.gd5f597d3d

Matplotlib Backend

No response

Python version

No response

Jupyter version

No response

Installation

None

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions