Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9f2af68

Browse files
committed
Invalid escape sequences are deprecated in Py3.6.
... so mark the strings with r"". For `psd`, the backslashes appear a bit lower, in `\mathrm` and `\log`.
1 parent 8279f64 commit 9f2af68

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

lib/matplotlib/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@
141141

142142
__version__numpy__ = str('1.7.1') # minimum required numpy version
143143

144-
__bibtex__ = """@Article{Hunter:2007,
144+
__bibtex__ = r"""@Article{Hunter:2007,
145145
Author = {Hunter, J. D.},
146146
Title = {Matplotlib: A 2D graphics environment},
147147
Journal = {Computing In Science \& Engineering},
@@ -398,7 +398,7 @@ def checkdep_tex():
398398
stderr=subprocess.PIPE)
399399
stdout, stderr = s.communicate()
400400
line = stdout.decode('ascii').split('\n')[0]
401-
pattern = '3\.1\d+'
401+
pattern = r'3\.1\d+'
402402
match = re.search(pattern, line)
403403
v = match.group(0)
404404
return v

lib/matplotlib/axes/_axes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6501,7 +6501,7 @@ def hist2d(self, x, y, bins=10, range=None, normed=False, weights=None,
65016501
def psd(self, x, NFFT=None, Fs=None, Fc=None, detrend=None,
65026502
window=None, noverlap=None, pad_to=None,
65036503
sides=None, scale_by_freq=None, return_line=None, **kwargs):
6504-
"""
6504+
r"""
65056505
Plot the power spectral density.
65066506
65076507
Call signature::

lib/matplotlib/mlab.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -887,7 +887,7 @@ def _single_spectrum_helper(x, mode, Fs=None, window=None, pad_to=None,
887887
@docstring.dedent_interpd
888888
def psd(x, NFFT=None, Fs=None, detrend=None, window=None,
889889
noverlap=None, pad_to=None, sides=None, scale_by_freq=None):
890-
"""
890+
r"""
891891
Compute the power spectral density.
892892
893893
Call signature::

0 commit comments

Comments
 (0)