Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 41a5adf commit b8d482fCopy full SHA for b8d482f
8 files changed
lib/matplotlib/mpl-data/matplotlibrc
@@ -301,9 +301,9 @@
301
## ("native" is a synonym.)
302
## - force_autohint: Use FreeType's auto-hinter. ("auto" is a synonym.)
303
## - no_hinting: Disable hinting. ("none" is a synonym.)
304
-#text.hinting: force_autohint
+#text.hinting: default
305
306
-#text.hinting_factor: 8 # Specifies the amount of softness for hinting in the
+#text.hinting_factor: 1 # Specifies the amount of softness for hinting in the
307
# horizontal direction. A value of 1 will hint to full
308
# pixels. A value of 2 will hint to half pixels etc.
309
#text.kerning_factor: 0 # Specifies the scaling factor for kerning values. This
lib/matplotlib/mpl-data/stylelib/_classic_test_patch.mplstyle
@@ -4,3 +4,6 @@
4
ytick.alignment: center_baseline
5
6
hatch.color: edge
7
+
8
+text.hinting: default
9
+text.hinting_factor: 1
lib/matplotlib/testing/__init__.py
@@ -19,8 +19,12 @@
19
20
def set_font_settings_for_testing():
21
mpl.rcParams['font.family'] = 'DejaVu Sans'
22
- mpl.rcParams['text.hinting'] = 'none'
23
- mpl.rcParams['text.hinting_factor'] = 8
+ if getattr(mpl, '_called_from_pytest', False):
+ mpl.rcParams['text.hinting'] = 'default'
24
+ mpl.rcParams['text.hinting_factor'] = 1
25
+ else:
26
+ mpl.rcParams['text.hinting'] = 'none'
27
+ mpl.rcParams['text.hinting_factor'] = 8
28
29
30
def set_reproducibility_for_testing():
lib/matplotlib/tests/test_axes.py
@@ -8145,8 +8145,8 @@ def test_normal_axes():
8145
8146
# test the axis bboxes
8147
target = [
8148
- [123.375, 75.88888888888886, 983.25, 33.0],
8149
- [85.51388888888889, 99.99999999999997, 53.375, 993.0]
+ [124.0, 76.89, 982.0, 32.0],
+ [86.89, 100.5, 52.0, 992.0],
8150
]
8151
for nn, b in enumerate(bbaxis):
8152
targetbb = mtransforms.Bbox.from_bounds(*target[nn])
@@ -8166,7 +8166,7 @@ def test_normal_axes():
8166
targetbb = mtransforms.Bbox.from_bounds(*target)
8167
assert_array_almost_equal(bbax.bounds, targetbb.bounds, decimal=2)
8168
8169
- target = [85.5138, 75.88888, 1021.11, 1017.11]
+ target = [86.89, 76.89, 1019.11, 1015.61]
8170
8171
assert_array_almost_equal(bbtb.bounds, targetbb.bounds, decimal=2)
8172
lib/matplotlib/tests/test_figure.py
@@ -814,7 +814,7 @@ def test_tightbbox():
814
ax.set_xlim(0, 1)
815
t = ax.text(1., 0.5, 'This dangles over end')
816
renderer = fig.canvas.get_renderer()
817
- x1Nom0 = 9.035 # inches
+ x1Nom0 = 8.9375 # inches
818
assert abs(t.get_tightbbox(renderer).x1 - x1Nom0 * fig.dpi) < 2
819
assert abs(ax.get_tightbbox(renderer).x1 - x1Nom0 * fig.dpi) < 2
820
assert abs(fig.get_tightbbox(renderer).x1 - x1Nom0) < 0.05
lib/matplotlib/tests/test_legend.py
@@ -469,10 +469,10 @@ def test_figure_legend_outside():
469
todos += ['left ' + pos for pos in ['lower', 'center', 'upper']]
470
todos += ['right ' + pos for pos in ['lower', 'center', 'upper']]
471
472
- upperext = [20.347556, 27.722556, 790.583, 545.499]
473
- lowerext = [20.347556, 71.056556, 790.583, 588.833]
474
- leftext = [151.681556, 27.722556, 790.583, 588.833]
475
- rightext = [20.347556, 27.722556, 659.249, 588.833]
+ upperext = [20.722556, 26.722556, 790.333, 545.999]
+ lowerext = [20.722556, 70.056556, 790.333, 589.333]
+ leftext = [152.056556, 26.722556, 790.333, 589.333]
+ rightext = [20.722556, 26.722556, 658.999, 589.333]
476
axbb = [upperext, upperext, upperext,
477
lowerext, lowerext, lowerext,
478
leftext, leftext, leftext,
lib/matplotlib/tests/test_polar.py
@@ -328,7 +328,7 @@ def test_get_tightbbox_polar():
328
fig.canvas.draw()
329
bb = ax.get_tightbbox(fig.canvas.get_renderer())
330
assert_allclose(
331
- bb.extents, [107.7778, 29.2778, 539.7847, 450.7222], rtol=1e-03)
+ bb.extents, [108.27778, 28.7778, 539.7222, 451.2222], rtol=1e-03)
332
333
334
@check_figures_equal()
lib/matplotlib/tests/test_text.py
@@ -711,14 +711,14 @@ def test_wrap(x, rotation, halign):
711
s = 'This is a very long text that should be wrapped multiple times.'
712
text = subfig.text(x, 0.7, s, wrap=True, rotation=rotation, ha=halign)
713
714
- assert text._get_wrapped_text() == ('This is a very long\n'
715
- 'text that should be\n'
+ assert text._get_wrapped_text() == ('This is a very long text\n'
+ 'that should be\n'
716
'wrapped multiple\n'
717
'times.')
718
719
720
def test_mathwrap():
721
- fig = plt.figure(figsize=(6, 4))
+ fig = plt.figure(figsize=(5, 4))
722
s = r'This is a very $\overline{\mathrm{long}}$ line of Mathtext.'
723
text = fig.text(0, 0.5, s, size=40, wrap=True)
724
0 commit comments