GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||
GeezerVison is showing github.com — Fix over/under mathtext symbols by aitikgupta · Pull Request #19314 · matplotlib/matplotlib Conversation
Contributor
PR SummaryThis PR fixes the alignment issues with the current Brief summary of the proposal: (This rewrites the following IDs of the tests): baselines_to_rewrite = [18, 22, 29, 34, 52, 67] Closes #19178 PR Checklist
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
|
There was an error while loading. Please reload this page.
|
Some tests other than
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I am confused as to why the mathfont tests (which do not involve subsuper) have baseline changes? (perhaps I'm missing something obvious...) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
It looks like maybe you updated |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
There's a good reason to believe 18 shouldn't be updated, but I think the global positioning inside svg is changing? (And yes, my bad, I just used the IDs of the baselines - so it included |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
1f5fb57 to
78d37a9
Compare
|
Yes, I can see that 18 needs updates in some places but not all of them. Try using |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
That's right, and it was deliberate - for 18 only these fail (6 out of 15 variants): 18-pdf-mathtext-cm 18-pdf-mathtext-dejavuserif 18-pdf-mathtext-stix 18-svg-mathtext-stix 18-svg-mathtext-stixsans For IDs like 22 or 67, (15 out of 15 fail): 67-pdf-mathtext-cm 67-pdf-mathtext-dejavusans 67-pdf-mathtext-dejavuserif 67-pdf-mathtext-stix 67-pdf-mathtext-stixsans 67-png-mathtext-cm 67-png-mathtext-dejavusans 67-png-mathtext-dejavuserif 67-png-mathtext-stix 67-png-mathtext-stixsans 67-svg-mathtext-cm 67-svg-mathtext-dejavusans 67-svg-mathtext-dejavuserif 67-svg-mathtext-stix 67-svg-mathtext-stixsans I believe we're comparing images with a tolerance? We could change just the failing images and forget about the IDs, it should not raise an error. Should I update the PR? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
No, the default tolerance is 0, and I don't see the mathtext tests setting anything different.
Yes, better to reduce test image churn when there is no failure necessitating an update. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
78d37a9 to
d8466c1
Compare
There was an error while loading. Please reload this page.
|
With the latest push only 67 failing The failing mathtext images:to_rewrite = [ "mathtext_cm_18.pdf", "mathtext_dejavuserif_18.pdf", "mathtext_stix_18.pdf", "mathtext_stix_18.svg", "mathtext_stixsans_18.svg", "mathtext_cm_22.pdf", "mathtext_dejavusans_22.pdf", "mathtext_dejavuserif_22.pdf", "mathtext_stix_22.pdf", "mathtext_stixsans_22.pdf", "mathtext_cm_22.png", "mathtext_dejavusans_22.png", "mathtext_dejavuserif_22.png", "mathtext_stix_22.png", "mathtext_stixsans_22.png", "mathtext_cm_22.svg", "mathtext_dejavusans_22.svg", "mathtext_dejavuserif_22.svg", "mathtext_stix_22.svg", "mathtext_stixsans_22.svg", "mathtext_dejavuserif_29.pdf", "mathtext_dejavusans_29.svg", "mathtext_cm_34.pdf", "mathtext_dejavusans_34.pdf", "mathtext_dejavuserif_34.pdf", "mathtext_stix_34.pdf", "mathtext_stixsans_34.pdf", "mathtext_cm_34.png", "mathtext_dejavusans_34.png", "mathtext_dejavuserif_34.png", "mathtext_stix_34.png", "mathtext_stixsans_34.png", "mathtext_cm_34.svg", "mathtext_dejavusans_34.svg", "mathtext_dejavuserif_34.svg", "mathtext_stix_34.svg", "mathtext_stixsans_34.svg", "mathtext_cm_52.pdf", "mathtext_dejavusans_52.pdf", "mathtext_dejavuserif_52.pdf", "mathtext_stix_52.pdf", "mathtext_stixsans_52.pdf", "mathtext_cm_52.png", "mathtext_dejavusans_52.png", "mathtext_dejavuserif_52.png", "mathtext_stix_52.png", "mathtext_stixsans_52.png", "mathtext_cm_52.svg", "mathtext_dejavusans_52.svg", "mathtext_dejavuserif_52.svg", "mathtext_stix_52.svg", "mathtext_stixsans_52.svg", "mathtext_cm_67.pdf", "mathtext_dejavusans_67.pdf", "mathtext_dejavuserif_67.pdf", "mathtext_stix_67.pdf", "mathtext_stixsans_67.pdf", "mathtext_cm_67.png", "mathtext_dejavusans_67.png", "mathtext_dejavuserif_67.png", "mathtext_stix_67.png", "mathtext_stixsans_67.png", "mathtext_cm_67.svg", "mathtext_dejavusans_67.svg", "mathtext_dejavuserif_67.svg", "mathtext_stix_67.svg", "mathtext_stixsans_67.svg" ] |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
It would need a second review. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Just a few points regarding the baseline images changes:
diff --git i/lib/matplotlib/tests/test_mathtext.py w/lib/matplotlib/tests/test_mathtext.py index 16ac7c7ba..b5fd906d2 100644 --- i/lib/matplotlib/tests/test_mathtext.py +++ w/lib/matplotlib/tests/test_mathtext.py @@ -31,11 +31,13 @@ math_tests = [ r'$x^2$', r'$x^2_y$', r'$x_y^2$', - r'$\prod_{i=\alpha_{i+1}}^\infty$', + (r'$\sum _{\genfrac{}{}{0}{}{0\leq i\leq m}{0<j<n}}f\left(i,j\right)' + r'\mathcal{R}\prod_{i=\alpha_{i+1}}^\infty a_i \sin(2 \pi f x_i)' + r"\sqrt[2]{\prod^\frac{x}{2\pi^2}_\infty}$"), r'$x = \frac{x+\frac{5}{2}}{\frac{y+3}{8}}$', r'$dz/dt = \gamma x^2 + {\rm sin}(2\pi y+\phi)$', r'Foo: $\alpha_{i+1}^j = {\rm sin}(2\pi f_j t_i) e^{-5 t_i/\tau}$', - r'$\mathcal{R}\prod_{i=\alpha_{i+1}}^\infty a_i \sin(2 \pi f x_i)$', + None, r'Variable $i$ is good', r'$\Delta_i^j$', r'$\Delta^j_{i+1}$', @@ -47,7 +49,7 @@ math_tests = [ r"$f'\quad f'''(x)\quad ''/\mathrm{yr}$", r'$\frac{x_2888}{y}$', r"$\sqrt[3]{\frac{X_2}{Y}}=5$", - r"$\sqrt[5]{\prod^\frac{x}{2\pi^2}_\infty}$", + None, r"$\sqrt[3]{x}=5$", r'$\frac{X}{\frac{X}{Y}}$', r"$W^{3\beta}_{\delta_1 \rho_1 \sigma_2} = U^{3\beta}_{\delta_1 \rho_1} + \frac{1}{8 \pi 2} \int^{\alpha_2}_{\alpha_2} d \alpha^\prime_2 \left[\frac{ U^{2\beta}_{\delta_1 \rho_1} - \alpha^\prime_2U^{1\beta}_{\rho_1 \sigma_2} }{U^{0\beta}_{\rho_1 \sigma_2}}\right]$", @@ -89,11 +91,13 @@ math_tests = [ r'${x}_{92}^{31415}+\pi $', r'${x}_{{y}_{b}^{a}}^{{z}_{c}^{d}}$', r'${y}_{3}^{\prime \prime \prime }$', + # End of the MathML torture tests. + r"$\left( \xi \left( 1 - \xi \right) \right)$", # Bug 2969451 r"$\left(2 \, a=b\right)$", # Sage bug #8125 r"$? ! &$", # github issue #466 None, - r'$\sum _{\genfrac{}{}{0}{}{0\leq i\leq m}{0<j<n}}P\left(i,j\right)$', + None, r"$\left\Vert a \right\Vert \left\vert b \right\vert \left| a \right| \left\| b\right\| \Vert a \Vert \vert b \vert$", r'$\mathring{A} \AA$', r'$M \, M \thinspace M \/ M \> M \: M \; M \ M \enspace M \quad M \qquad M \! M$', (together with updating image 18 for the new test) shrinks the overall size of the new baselines from 508K to 256K, a not insignificant saving. (I explicitly left test 52 alone as we can reasonably leave the "mathml torture test" as is; I also slightly tweaked the mathtext expression to reduce the number of independent glyphs used.) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I notice something interesting: (side by side) Maybe it's hard to notice here, but there is definitely something fishy w.r.t. png vs svg backend? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
d8466c1 to
b74db71
Compare
There was an error while loading. Please reload this page.
|
Without looking carefully at this, it may be related to #19261 (comment) / #5414? (If so, this may change depending on |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
You will need to rebase if you want to fix the docs CI build. @anntzer is there anything else left to do here? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Nope, lgtm. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
No, it doesn't look like this has any relevant doc changes. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
b0dbead via matplotlib#19314 several tests were merged but the images for them were not removed.
b0dbead via matplotlib#19314 several tests were merged but the images for them were not removed.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
mathtext \lim is vertically misaligned
There was an error while loading. Please reload this page.