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

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

Projects
None yet
2 participants
Contributor

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

Owner

mdboom commented May 2, 2013

I'll look into it.

Owner

mdboom commented May 2, 2013

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

Contributor

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

Merge pull request #1968 from mdboom/rotated_text
Rotated text element misalignment in Agg

@mdboom mdboom merged commit 3120e6c into matplotlib:master May 2, 2013

@mdboom mdboom deleted the mdboom:rotated_text branch Aug 7, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment