| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 126113f commit 5e5d7eb
10 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -37,3 +37,4 @@ The following classes, methods, functions, and attributes are deprecated: | |||
| 37 | 37 | ||
| 38 | 38 | The following rcParams are deprecated: | |
| 39 | 39 | - ``pgf.debug`` (the pgf backend relies on logging), | |
| 40 | + - ``text.latex.unicode``, | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,8 @@ | |||
| 1 | + Changes regarding the text.latex.unicode rcParam | ||
| 2 | + ```````````````````````````````````````````````` | ||
| 3 | + | ||
| 4 | + The rcParam now defaults to True and is deprecated (i.e., in future versions | ||
| 5 | + of Maplotlib, unicode input will always be supported). | ||
| 6 | + | ||
| 7 | + Moreover, the underlying implementation now uses ``\usepackage[utf8]{inputenc}`` | ||
| 8 | + instead of ``\usepackage{ucs}\usepackage[utf8x]{inputenc}``. | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -17,7 +17,6 @@ | |||
| 17 | 17 | import numpy as np | |
| 18 | 18 | import matplotlib | |
| 19 | 19 | matplotlib.rcParams['text.usetex'] = True | |
| 20 | - matplotlib.rcParams['text.latex.unicode'] = True | ||
| 21 | 20 | import matplotlib.pyplot as plt | |
| 22 | 21 | ||
| 23 | 22 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -11,7 +11,6 @@ | |||
| 11 | 11 | ||
| 12 | 12 | from matplotlib import rcParams | |
| 13 | 13 | rcParams['text.usetex'] = True | |
| 14 | - rcParams['text.latex.unicode'] = True | ||
| 15 | 14 | ||
| 16 | 15 | ||
| 17 | 16 | class Axes(maxes.Axes): | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -820,7 +820,8 @@ def gen_candidates(): | |||
| 820 | 820 | # do NOT include in _all_deprecated | |
| 821 | 821 | _deprecated_set = {'axes.hold', | |
| 822 | 822 | 'backend.qt4', | |
| 823 | - 'backend.qt5'} | ||
| 823 | + 'backend.qt5', | ||
| 824 | + 'text.latex.unicode'} | ||
| 824 | 825 | ||
| 825 | 826 | _all_deprecated = set(itertools.chain( | |
| 826 | 827 | _deprecated_ignore_map, _deprecated_map, _obsolete_set)) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -109,8 +109,8 @@ text.usetex : False # use latex for all text handling. The following fo | |||
| 109 | 109 | # If another font is desired which can loaded using the | |
| 110 | 110 | # LaTeX \usepackage command, please inquire at the | |
| 111 | 111 | # matplotlib mailing list | |
| 112 | - text.latex.unicode : False # use "ucs" and "inputenc" LaTeX packages for handling | ||
| 113 | - # unicode strings. | ||
| 112 | + # text.latex.unicode : False # use "ucs" and "inputenc" LaTeX packages for handling | ||
| 113 | + # # unicode strings. | ||
| 114 | 114 | text.latex.preamble : # IMPROPER USE OF THIS FEATURE WILL LEAD TO LATEX FAILURES | |
| 115 | 115 | # AND IS THEREFORE UNSUPPORTED. PLEASE DO NOT ASK FOR HELP | |
| 116 | 116 | # IF THIS FEATURE DOES NOT DO WHAT YOU EXPECT IT TO. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -111,8 +111,8 @@ text.usetex : False # use latex for all text handling. The following fo | |||
| 111 | 111 | # If another font is desired which can loaded using the | |
| 112 | 112 | # LaTeX \usepackage command, please inquire at the | |
| 113 | 113 | # matplotlib mailing list | |
| 114 | - text.latex.unicode : False # use "ucs" and "inputenc" LaTeX packages for handling | ||
| 115 | - # unicode strings. | ||
| 114 | + # text.latex.unicode : False # use "ucs" and "inputenc" LaTeX packages for handling | ||
| 115 | + # # unicode strings. | ||
| 116 | 116 | text.latex.preamble : # IMPROPER USE OF THIS FEATURE WILL LEAD TO LATEX FAILURES | |
| 117 | 117 | # AND IS THEREFORE UNSUPPORTED. PLEASE DO NOT ASK FOR HELP | |
| 118 | 118 | # IF THIS FEATURE DOES NOT DO WHAT YOU EXPECT IT TO. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1115,7 +1115,7 @@ def _validate_linestyle(ls): | |||
| 1115 | 1115 | # text props | |
| 1116 | 1116 | 'text.color': ['black', validate_color], | |
| 1117 | 1117 | 'text.usetex': [False, validate_bool], | |
| 1118 | - 'text.latex.unicode': [False, validate_bool], | ||
| 1118 | + 'text.latex.unicode': [True, validate_bool], | ||
| 1119 | 1119 | 'text.latex.preamble': [[''], validate_stringlist], | |
| 1120 | 1120 | 'text.latex.preview': [False, validate_bool], | |
| 1121 | 1121 | 'text.dvipnghack': [None, validate_bool_maybe_none], | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -32,11 +32,11 @@ | |||
| 32 | 32 | needs_ghostscript( | |
| 33 | 33 | ('ps', False, {'ps.usedistiller': 'ghostscript'})), | |
| 34 | 34 | needs_usetex(needs_ghostscript( | |
| 35 | - ('ps', False, {'text.latex.unicode': True, 'text.usetex': True}))), | ||
| 35 | + ('ps', False, {'text.usetex': True}))), | ||
| 36 | 36 | ('eps', False, {}), | |
| 37 | 37 | ('eps', True, {'ps.useafm': True}), | |
| 38 | 38 | needs_usetex(needs_ghostscript( | |
| 39 | - ('eps', False, {'text.latex.unicode': True, 'text.usetex': True}))), | ||
| 39 | + ('eps', False, {'text.usetex': True}))), | ||
| 40 | 40 | ], ids=[ | |
| 41 | 41 | 'ps', | |
| 42 | 42 | 'ps with distiller', | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -203,8 +203,7 @@ def make_tex(self, tex, fontsize): | |||
| 203 | 203 | ||
| 204 | 204 | if rcParams['text.latex.unicode']: | |
| 205 | 205 | unicode_preamble = r""" | |
| 206 | - \usepackage{ucs} | ||
| 207 | - \usepackage[utf8x]{inputenc}""" | ||
| 206 | + \usepackage[utf8]{inputenc}""" | ||
| 208 | 207 | else: | |
| 209 | 208 | unicode_preamble = '' | |
| 210 | 209 | ||
@@ -255,8 +254,7 @@ def make_tex_preview(self, tex, fontsize): | |||
| 255 | 254 | ||
| 256 | 255 | if rcParams['text.latex.unicode']: | |
| 257 | 256 | unicode_preamble = r""" | |
| 258 | - \usepackage{ucs} | ||
| 259 | - \usepackage[utf8x]{inputenc}""" | ||
| 257 | + \usepackage[utf8]{inputenc}""" | ||
| 260 | 258 | else: | |
| 261 | 259 | unicode_preamble = '' | |
| 262 | 260 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments