8000 MNT: catch more illegal '\' by tacaswell · Pull Request #10806 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

MNT: catch more illegal '\' #10806

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/matplotlib/backends/backend_pgf.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@


_luatex_version_re = re.compile(
'This is LuaTeX, Version (?:beta-)?([0-9]+)\.([0-9]+)\.([0-9]+)'
r'This is LuaTeX, Version (?:beta-)?([0-9]+)\.([0-9]+)\.([0-9]+)'
)


Expand Down Expand Up @@ -1199,7 +1199,7 @@ def savefig(self, figure=None, **kwargs):
figure.canvas = orig_canvas

def _build_newpage_command(self, width, height):
'''LuaLaTeX from version 0.85 removed the `\pdf*` primitives,
r'''LuaLaTeX from version 0.85 removed the `\pdf*` primitives,
so we need to check the lualatex version and use `\pagewidth` if
the version is 0.85 or newer
'''
Expand Down
24 changes: 12 additions & 12 deletions lib/mpl_toolkits/axisartist/angle_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,18 +209,18 @@ def __call__(self, v1, v2):


class FormatterDMS(object):
deg_mark = "^{\circ}"
min_mark = "^{\prime}"
sec_mark = "^{\prime\prime}"
deg_mark = r"^{\circ}"
min_mark = r"^{\prime}"
sec_mark = r"^{\prime\prime}"

fmt_d = "$%d" + deg_mark + "$"
fmt_ds = r"$%d.%s" + deg_mark + "$"

# %s for sign
fmt_d_m = r"$%s%d" + deg_mark + "\,%02d" + min_mark + "$"
fmt_d_ms = r"$%s%d" + deg_mark + "\,%02d.%s" + min_mark + "$"
fmt_d_m = r"$%s%d" + deg_mark + r"\,%02d" + min_mark + "$"
fmt_d_ms = r"$%s%d" + deg_mark + r"\,%02d.%s" + min_mark + "$"

fmt_d_m_partial = "$%s%d" + deg_mark + "\,%02d" + min_mark + "\,"
fmt_d_m_partial = "$%s%d" + deg_mark + r"\,%02d" + min_mark + r"\,"
fmt_s_partial = "%02d" + sec_mark + "$"
fmt_ss_partial = "%02d.%s" + sec_mark + "$"

Expand Down Expand Up @@ -315,18 +315,18 @@ def __call__(self, direction, factor, values):


class FormatterHMS(FormatterDMS):
deg_mark = "^\mathrm{h}"
min_mark = "^\mathrm{m}"
sec_mark = "^\mathrm{s}"
deg_mark = r"^\mathrm{h}"
min_mark = r"^\mathrm{m}"
sec_mark = r"^\mathrm{s}"

fmt_d = "$%d" + deg_mark + "$"
fmt_ds = r"$%d.%s" + deg_mark + "$"

# %s for sign
fmt_d_m = r"$%s%d" + deg_mark + "\,%02d" + min_mark+"$"
fmt_d_ms = r"$%s%d" + deg_mark + "\,%02d.%s" + min_mark+"$"
fmt_d_m = r"$%s%d" + deg_mark + r"\,%02d" + min_mark+"$"
fmt_d_ms = r"$%s%d" + deg_mark + r"\,%02d.%s" + min_mark+"$"

fmt_d_m_partial = "$%s%d" + deg_mark + "\,%02d" + min_mark + "\,"
fmt_d_m_partial = "$%s%d" + deg_mark + r"\,%02d" + min_mark + r"\,"
fmt_s_partial = "%02d" + sec_mark + "$"
fmt_ss_partial = "%02d.%s" + sec_mark + "$"

Expand Down
0