Skip to content

Rotated text element misalignment in Agg#1968

Merged
mdboom merged 1 commit into
matplotlib:masterfrom
mdboom:rotated_text
May 2, 2013
Merged

Rotated text element misalignment in Agg#1968
mdboom merged 1 commit into
matplotlib:masterfrom
mdboom:rotated_text

Conversation

@mdboom

@mdboom mdboom commented May 2, 2013

Copy link
Copy Markdown
Member

There is an alignment problem with rotated text elements in master when using the agg backend. In the svg and pdf output the two texts from the following example are aligned to the blue baselines as intended, whereas the png (agg) output doesn't provide the expected result.

plt.axhline(.5)
plt.axvline(.4)
plt.axvline(.6)
plt.xlim(0, 1)
plt.ylim(0, 1)
plt.text(.4, .5, "abcd", rotation=90, rotation_mode="anchor", va="baseline")
plt.text(.6, .5, "efgh", rotation=90, rotation_mode="anchor", va="baseline")
plt.savefig("roated_baseline.pdf")
plt.savefig("roated_baseline.png")

test

A side effect from #1810 perhaps?

@ghost ghost assigned mdboom May 2, 2013
@mdboom

mdboom commented May 2, 2013

Copy link
Copy Markdown
Member

I'll look into it.

@mdboom

mdboom commented May 2, 2013

Copy link
Copy Markdown
Member

Pretty silly error, actually. @pwuertz: Would you mind confirming that this works?

@pwuertz

pwuertz commented May 2, 2013

Copy link
Copy Markdown
Contributor Author

Jep, perfect. Thanks for that super-fast fix :).

mdboom added a commit that referenced this pull request May 2, 2013
Rotated text element misalignment in Agg
@mdboom mdboom merged commit 3120e6c into matplotlib:master May 2, 2013
@mdboom mdboom deleted the rotated_text branch August 7, 2014 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants