Wrong text baseline with usetex. #2015

merged 2 commits into from May 16, 2013

2 participants


With current master, examples/pylab_examples/usetex_baseline_test.py produces the following image. And the baseline is wrong when usetex is used.


It used to work fine and it still does in v1.2.x.


Any clue what changed this?

Matplotlib Developers member

Probably #1810, which changed how baselines are handled. I'll look into it.

@mdboom mdboom was assigned May 15, 2013
@mdboom mdboom Fix #2015: After the baseline refactoring in #1810, baseline handling…
… was broken for text.usetex = True. This brings it inline with everything else (where the assumption is that y == 0 is the baseline and not the bottom).
Matplotlib Developers member

@leejjoon: I think this should do it.

[Background: #1810 changed things so the backends were passed the location of the baseline, rather than the bottom, of the text for draw_text. This is much more natural for most backends (other than Agg) and simplified a number of things. This just brings the draw_tex methods inline with that.]


Thanks! This fixes the problem.

@mdboom mdboom merged commit 4ed18ca into matplotlib:master May 16, 2013

1 check passed

Details default The Travis CI build passed
@mdboom mdboom deleted the mdboom:usetex-baseline-fixes branch Aug 7, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment