X Tutup
Skip to content

Text: rotation inconsistency #6722

@astromancer

Description

@astromancer

Text rotation seems to occur about different points depending on the sign of the angle passed:

import matplotlib.pyplot as plt
from matplotlib import __version__
print(__version__)
#2.0.0b1+1800.g5c1e64d.dirty

fig, ax = plt.subplots()
xx = 0.5, 0.5
ax.plot(*xx, 'rx')
blk = '\u2588' * 10  #unicode blocks
ax.text(*xx, blk, rotation=-45, color='b')  # rotation about point xx
ax.text(*xx, blk, rotation=45, color='r')   # rotation about rhs of textbox

txt

So essentially: A negative angle rotates about the lower left corner of text box, while a positive angle rotates about the lower right corner of text box. Is this desired behaviour? Personally I find it somewhat confusing and would expect rotations to have the same origin, regardless of the sign of the angle passed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup