Skip to content

Polar plot label rotation ignored #10882

Open
@ImportanceOfBeingErnest

Description

Bug report

Bug summary

In matplotlib 2.0.2 you could rotate the axes labels on a polar plot, just as with any other plot

for i, label in enumerate(ax.get_xticklabels()):
    label.set_rotation(i*90)

This is not possible anymore with matplotlib 2.2.2

Code for reproduction

import matplotlib
import numpy as np
import matplotlib.pyplot as plt


fig=plt.figure(figsize=(4,3))
ax = plt.subplot(111, polar=True)
ax.set_xlabel("Matplotlib "+matplotlib.__version__)
ticks = np.arange(3)*np.pi/2.
labels = ["".join([a]*5) for a in list("ABC")]

plt.xticks(ticks, labels, size=16)
for i, label in enumerate(ax.get_xticklabels()):
    label.set_rotation(i*90)

plt.tight_layout()
plt.show()

Actual outcome with matplotlib 2.2.2

The rotation of the labels is simply ignored.

image

Expected outcome (as with 2.0.2)

We would expect to see the labels rotated as in this plot, produced by the same code run on matplotlib 2.0.2.

image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy