X Tutup
Skip to content

horizontalalignment 'left' and 'right' do not handle spacing consistently #4380

@jason-sachs

Description

@jason-sachs

horizontalalignment respects leading spaces with left-alignment, ignores trailing spaces

import matplotlib.pyplot as plt

fig = plt.figure(figsize=(8,6))
ax = fig.gca()
ax.plot([0,0],[-1,1],':')
for k in xrange(5):
    spc = " "*k
    ax.text(0.0,0.1*k,spc+"%d leading spaces"%k, ha='left')
    ax.text(0.0,0.1*k,("%d trailing spaces"%k)+spc, ha='right')

image

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

      X Tutup