Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Open
Description
Bug summary
Using a high horizontal ruler overwrites denominator
Code for reproduction
importmatplotlib.pyplotaspltplt.text(0.5,0.5,r'$\genfrac{}{}{10}{}{foo}{bar}$')plt.draw()
Actual outcome
Expected outcome
This is from LaTeX rendering, but actually not that good either. It seems like the distance is also scaled with the height of the bar.
Additional information
Using
vlist = Vlist([cnum, # numerator Vbox(0, thickness * 2.0), # space Hrule(state, rule), # rule Vbox(0, thickness * 2.0 + 2 * rule), # space cden # denominator ])
in_genfrac
(that is, adding 2 * rule to the second spacer) gives
Which I guess it at least somewhat consistent and no overwrite. The question is if one can/want to do better?
I can include this is#22171 if it seems like a reasonable solution.
Operating system
Windows 10
Matplotlib Version
3.6.0.dev1270+g46d2a1e.d20220109
Matplotlib Backend
module://matplotlib_inline.backend_inline
Python version
3.9.9
Jupyter version
No response
Installation
git checkout
Metadata
Metadata
Assignees
Labels
No labels