Skip to content

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.

2 participants