diff --git a/MANIFEST.in b/MANIFEST.in index de340d48ded7..85caada2a1bd 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -19,3 +19,4 @@ recursive-include lib * recursive-include extern * include versioneer.py include lib/matplotlib/_version.py +include tests.py diff --git a/doc/_templates/citing.html b/doc/_templates/citing.html index 9c508c4c3bc2..6f9bc9e3ae7c 100644 --- a/doc/_templates/citing.html +++ b/doc/_templates/citing.html @@ -28,6 +28,7 @@

Citing matplotlib

DOIs

+
v1.5.1
10.5281/zenodo.44579
v1.5.0
10.5281/zenodo.32914
v1.4.3
10.5281/zenodo.15423
v1.4.2
10.5281/zenodo.12400
diff --git a/doc/devel/MEP/MEP13.rst b/doc/devel/MEP/MEP13.rst index 9230dfe2805e..3200a1b742cb 100644 --- a/doc/devel/MEP/MEP13.rst +++ b/doc/devel/MEP/MEP13.rst @@ -1,5 +1,5 @@ ================================= -MEP12: Use properties for Artists +MEP13: Use properties for Artists ================================= .. contents:: diff --git a/doc/devel/MEP/MEP14.rst b/doc/devel/MEP/MEP14.rst index 31d03190b5cd..9542b6885fef 100644 --- a/doc/devel/MEP/MEP14.rst +++ b/doc/devel/MEP/MEP14.rst @@ -1,5 +1,5 @@ ==================== -MEP13: Text handling +MEP14: Text handling ==================== .. contents:: diff --git a/examples/pylab_examples/legend_demo5.py b/examples/pylab_examples/legend_demo5.py index 699babe2b631..56689660735b 100644 --- a/examples/pylab_examples/legend_demo5.py +++ b/examples/pylab_examples/legend_demo5.py @@ -41,7 +41,7 @@ def create_artists(self, legend, orig_handle, lw = orig_handle.get_linewidths()[i] except IndexError: lw = orig_handle.get_linewidths()[0] - if dashes[0] != None: + if dashes[0] is not None: legline.set_dashes(dashes[1]) legline.set_color(color) legline.set_transform(trans) diff --git a/lib/matplotlib/mathtext.py b/lib/matplotlib/mathtext.py index ce4de437403c..9993cd5f1f73 100644 --- a/lib/matplotlib/mathtext.py +++ b/lib/matplotlib/mathtext.py @@ -2646,6 +2646,20 @@ def symbol(self, s, loc, toks): self._make_space(0.2)] , do_kern = True)] elif c in self._punctuation_symbols: + + # Do not space commas between brackets + if c == ',': + for i in six.moves.xrange(1, loc + 1): + prev_char = s[loc - i] + if prev_char != ' ': + break + for i in six.moves.xrange(1, loc + 1): + next_char = s[loc + i] + if next_char != ' ': + break + if (prev_char == '{' and next_char == '}'): + return [char] + # Do not space dots as decimal separators if (c == '.' and s[loc - 1].isdigit() and s[loc + 1].isdigit()): return [char] @@ -2819,6 +2833,9 @@ def is_slanted(self, nucleus): return nucleus.is_slanted() return False + def is_between_brackets(self, s, loc): + return False + def subsuper(self, s, loc, toks): assert(len(toks)==1) diff --git a/lib/matplotlib/tests/baseline_images/test_image/rasterize_10dpi.svg b/lib/matplotlib/tests/baseline_images/test_image/rasterize_10dpi.svg index 2a4d957c18fa..1f73c8fe9259 100644 --- a/lib/matplotlib/tests/baseline_images/test_image/rasterize_10dpi.svg +++ b/lib/matplotlib/tests/baseline_images/test_image/rasterize_10dpi.svg @@ -5,7 +5,7 @@ @@ -26,8 +26,8 @@ L 27 11.382353 z " style="fill:#ffffff;"/> - - + @@ -42,8 +42,8 @@ L 86.082353 7.2 z " style="fill:#ffffff;"/> - + @@ -57,20 +57,20 @@ z " style="fill:#ffffff;"/> - +" style="fill:none;stroke:#0000ff;stroke-linecap:square;stroke-width:20.0;"/> - - - - + + + + diff --git a/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_cm_80.pdf b/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_cm_80.pdf new file mode 100644 index 000000000000..cedb7c898fd1 Binary files /dev/null and b/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_cm_80.pdf differ diff --git a/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_cm_80.png b/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_cm_80.png new file mode 100644 index 000000000000..a54eedcc5eb9 Binary files /dev/null and b/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_cm_80.png differ diff --git a/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_cm_80.svg b/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_cm_80.svg new file mode 100644 index 000000000000..3f5fcb8a823b --- /dev/null +++ b/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_cm_80.svg @@ -0,0 +1,543 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_dejavusans_80.pdf b/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_dejavusans_80.pdf new file mode 100644 index 000000000000..c456bf519d60 Binary files /dev/null and b/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_dejavusans_80.pdf differ diff --git a/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_dejavusans_80.png b/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_dejavusans_80.png new file mode 100644 index 000000000000..77f201ad7e79 Binary files /dev/null and b/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_dejavusans_80.png differ diff --git a/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_dejavusans_80.svg b/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_dejavusans_80.svg new file mode 100644 index 000000000000..ed538515d234 --- /dev/null +++ b/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_dejavusans_80.svg @@ -0,0 +1,369 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_dejavuserif_80.pdf b/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_dejavuserif_80.pdf new file mode 100644 index 000000000000..dda13decf161 Binary files /dev/null and b/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_dejavuserif_80.pdf differ diff --git a/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_dejavuserif_80.png b/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_dejavuserif_80.png new file mode 100644 index 000000000000..ae52bed06cb5 Binary files /dev/null and b/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_dejavuserif_80.png differ diff --git a/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_dejavuserif_80.svg b/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_dejavuserif_80.svg new file mode 100644 index 000000000000..f02f17f8eede --- /dev/null +++ b/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_dejavuserif_80.svg @@ -0,0 +1,383 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_stix_80.pdf b/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_stix_80.pdf new file mode 100644 index 000000000000..22f414b598f2 Binary files /dev/null and b/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_stix_80.pdf differ diff --git a/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_stix_80.png b/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_stix_80.png new file mode 100644 index 000000000000..1b8a075f997c Binary files /dev/null and b/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_stix_80.png differ diff --git a/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_stix_80.svg b/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_stix_80.svg new file mode 100644 index 000000000000..5f6c111c106d --- /dev/null +++ b/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_stix_80.svg @@ -0,0 +1,382 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_stixsans_80.pdf b/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_stixsans_80.pdf new file mode 100644 index 000000000000..eb6a537b9262 Binary files /dev/null and b/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_stixsans_80.pdf differ diff --git a/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_stixsans_80.png b/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_stixsans_80.png new file mode 100644 index 000000000000..1e0daf1e9293 Binary files /dev/null and b/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_stixsans_80.png differ diff --git a/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_stixsans_80.svg b/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_stixsans_80.svg new file mode 100644 index 000000000000..baf25a7400bf --- /dev/null +++ b/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_stixsans_80.svg @@ -0,0 +1,369 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/matplotlib/tests/test_mathtext.py b/lib/matplotlib/tests/test_mathtext.py index f329c1b89491..eeac74ad3878 100644 --- a/lib/matplotlib/tests/test_mathtext.py +++ b/lib/matplotlib/tests/test_mathtext.py @@ -105,6 +105,7 @@ ' '.join('$\\' + p + '$' for p in sorted(mathtext.Parser._snowflake)), r'$6-2$; $-2$; $ -2$; ${-2}$; ${ -2}$; $20^{+3}_{-2}$', r'$\overline{\omega}^x \frac{1}{2}_0^x$', # github issue #5444 + r'$1{,}234{, }567{ , }890$ and $1,234,567,890$', # github issue 5799 ] digits = "0123456789"