Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rotated text element misalignment in Agg #1968

Merged
merged 1 commit into from May 2, 2013

Conversation

mdboom
Copy link
Member

@mdboom mdboom commented May 2, 2013

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
Copy link
Member

mdboom commented May 2, 2013

I'll look into it.

@mdboom
Copy link
Member

mdboom commented May 2, 2013

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

@pwuertz
Copy link
Contributor Author

pwuertz commented May 2, 2013

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.

None yet

2 participants