The one of the Matploltlib example
up vote
0
down vote
favorite
import numpy as np
import matplotlib
matplotlib.rcParams['text.usetex'] = True
import matplotlib.pyplot as plt
t = np.linspace(0.0, 1.0, 100)
s = np.cos(4 * np.pi * t) + 2
fig, ax = plt.subplots(figsize=(6, 4), tight_layout=True)
ax.plot(t, s)
ax.set_xlabel(r'textbf{time (s)}')
ax.set_ylabel('itshape {Velocity (N{DEGREE SIGN}/sec)}', fontsize=16)
ax.set_title(r'TeX is Number $displaystylesum_{n=1}^infty'
r'frac{-e^{ipi}}{2^n}$!', fontsize=16, color='r')
plt.show()
This is the Tex example on Matplotlib site.
But, I got this messauntimeError:
latex was not able to process the following string:
'\\itshape {Velocity (\\N{DEGREE SIGN}/sec)}'
Here is the full report generated by latex:
This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=latex)
restricted write18 enabled.
entering extended mode
(/home/joshua/.cache/matplotlib/tex.cache/88a38ed565fe9aac24ebc44c9a0be443.tex
LaTeX2e <2016/02/01>
Babel <3.9q> and hyphenation patterns for 81 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))
(/usr/share/texlive/texmf-dist/tex/latex/type1cm/type1cm.sty)
(/usr/share/texlive/texmf-dist/tex/latex/base/textcomp.sty
(/usr/share/texlive/texmf-dist/tex/latex/base/ts1enc.def))
(/usr/share/texlive/texmf-dist/tex/latex/ucs/ucs.sty
(/usr/share/texlive/texmf-dist/tex/latex/ucs/data/uni-global.def))
(/usr/share/texlive/texmf-dist/tex/latex/base/inputenc.sty
(/usr/share/texlive/texmf-dist/tex/latex/ucs/utf8x.def))
(/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifvtex.sty)
(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty)
Package geometry Warning: Over-specification in `h'-direction.
`width' (5058.9pt) is ignored.
Package geometry Warning: Over-specification in `v'-direction.
`height' (5058.9pt) is ignored.
) (./88a38ed565fe9aac24ebc44c9a0be443.aux)
(/usr/share/texlive/texmf-dist/tex/latex/base/ts1cmr.fd)
(/usr/share/texlive/texmf-dist/tex/latex/ucs/ucsencs.def)
*geometry* driver: auto-detecting
*geometry* detected driver: dvips
LaTeX Font Warning: Font shape `OT1/cmss/m/it' in size <16> not available
(Font) Font shape `OT1/cmss/m/sl' tried instead on input line 15.
! Undefined control sequence.
l.15 ...0.000000}{sffamily itshape {Velocity (N
{DEGREE SIGN}/sec)}}
No pages of output.
Transcript written on 88a38ed565fe9aac24ebc44c9a0be443.log.ge over and over.
Is there anyone to solve this problem?
matplotlib
New contributor
add a comment |
up vote
0
down vote
favorite
import numpy as np
import matplotlib
matplotlib.rcParams['text.usetex'] = True
import matplotlib.pyplot as plt
t = np.linspace(0.0, 1.0, 100)
s = np.cos(4 * np.pi * t) + 2
fig, ax = plt.subplots(figsize=(6, 4), tight_layout=True)
ax.plot(t, s)
ax.set_xlabel(r'textbf{time (s)}')
ax.set_ylabel('itshape {Velocity (N{DEGREE SIGN}/sec)}', fontsize=16)
ax.set_title(r'TeX is Number $displaystylesum_{n=1}^infty'
r'frac{-e^{ipi}}{2^n}$!', fontsize=16, color='r')
plt.show()
This is the Tex example on Matplotlib site.
But, I got this messauntimeError:
latex was not able to process the following string:
'\\itshape {Velocity (\\N{DEGREE SIGN}/sec)}'
Here is the full report generated by latex:
This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=latex)
restricted write18 enabled.
entering extended mode
(/home/joshua/.cache/matplotlib/tex.cache/88a38ed565fe9aac24ebc44c9a0be443.tex
LaTeX2e <2016/02/01>
Babel <3.9q> and hyphenation patterns for 81 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))
(/usr/share/texlive/texmf-dist/tex/latex/type1cm/type1cm.sty)
(/usr/share/texlive/texmf-dist/tex/latex/base/textcomp.sty
(/usr/share/texlive/texmf-dist/tex/latex/base/ts1enc.def))
(/usr/share/texlive/texmf-dist/tex/latex/ucs/ucs.sty
(/usr/share/texlive/texmf-dist/tex/latex/ucs/data/uni-global.def))
(/usr/share/texlive/texmf-dist/tex/latex/base/inputenc.sty
(/usr/share/texlive/texmf-dist/tex/latex/ucs/utf8x.def))
(/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifvtex.sty)
(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty)
Package geometry Warning: Over-specification in `h'-direction.
`width' (5058.9pt) is ignored.
Package geometry Warning: Over-specification in `v'-direction.
`height' (5058.9pt) is ignored.
) (./88a38ed565fe9aac24ebc44c9a0be443.aux)
(/usr/share/texlive/texmf-dist/tex/latex/base/ts1cmr.fd)
(/usr/share/texlive/texmf-dist/tex/latex/ucs/ucsencs.def)
*geometry* driver: auto-detecting
*geometry* detected driver: dvips
LaTeX Font Warning: Font shape `OT1/cmss/m/it' in size <16> not available
(Font) Font shape `OT1/cmss/m/sl' tried instead on input line 15.
! Undefined control sequence.
l.15 ...0.000000}{sffamily itshape {Velocity (N
{DEGREE SIGN}/sec)}}
No pages of output.
Transcript written on 88a38ed565fe9aac24ebc44c9a0be443.log.ge over and over.
Is there anyone to solve this problem?
matplotlib
New contributor
1
Welcome to TeX.SE!N
is interpreted as a command by LaTeX, which is not defined. I don't know Matplotlib, could you add the LaTeX code generated by it?
– CarLaTeX
35 mins ago
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
import numpy as np
import matplotlib
matplotlib.rcParams['text.usetex'] = True
import matplotlib.pyplot as plt
t = np.linspace(0.0, 1.0, 100)
s = np.cos(4 * np.pi * t) + 2
fig, ax = plt.subplots(figsize=(6, 4), tight_layout=True)
ax.plot(t, s)
ax.set_xlabel(r'textbf{time (s)}')
ax.set_ylabel('itshape {Velocity (N{DEGREE SIGN}/sec)}', fontsize=16)
ax.set_title(r'TeX is Number $displaystylesum_{n=1}^infty'
r'frac{-e^{ipi}}{2^n}$!', fontsize=16, color='r')
plt.show()
This is the Tex example on Matplotlib site.
But, I got this messauntimeError:
latex was not able to process the following string:
'\\itshape {Velocity (\\N{DEGREE SIGN}/sec)}'
Here is the full report generated by latex:
This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=latex)
restricted write18 enabled.
entering extended mode
(/home/joshua/.cache/matplotlib/tex.cache/88a38ed565fe9aac24ebc44c9a0be443.tex
LaTeX2e <2016/02/01>
Babel <3.9q> and hyphenation patterns for 81 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))
(/usr/share/texlive/texmf-dist/tex/latex/type1cm/type1cm.sty)
(/usr/share/texlive/texmf-dist/tex/latex/base/textcomp.sty
(/usr/share/texlive/texmf-dist/tex/latex/base/ts1enc.def))
(/usr/share/texlive/texmf-dist/tex/latex/ucs/ucs.sty
(/usr/share/texlive/texmf-dist/tex/latex/ucs/data/uni-global.def))
(/usr/share/texlive/texmf-dist/tex/latex/base/inputenc.sty
(/usr/share/texlive/texmf-dist/tex/latex/ucs/utf8x.def))
(/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifvtex.sty)
(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty)
Package geometry Warning: Over-specification in `h'-direction.
`width' (5058.9pt) is ignored.
Package geometry Warning: Over-specification in `v'-direction.
`height' (5058.9pt) is ignored.
) (./88a38ed565fe9aac24ebc44c9a0be443.aux)
(/usr/share/texlive/texmf-dist/tex/latex/base/ts1cmr.fd)
(/usr/share/texlive/texmf-dist/tex/latex/ucs/ucsencs.def)
*geometry* driver: auto-detecting
*geometry* detected driver: dvips
LaTeX Font Warning: Font shape `OT1/cmss/m/it' in size <16> not available
(Font) Font shape `OT1/cmss/m/sl' tried instead on input line 15.
! Undefined control sequence.
l.15 ...0.000000}{sffamily itshape {Velocity (N
{DEGREE SIGN}/sec)}}
No pages of output.
Transcript written on 88a38ed565fe9aac24ebc44c9a0be443.log.ge over and over.
Is there anyone to solve this problem?
matplotlib
New contributor
import numpy as np
import matplotlib
matplotlib.rcParams['text.usetex'] = True
import matplotlib.pyplot as plt
t = np.linspace(0.0, 1.0, 100)
s = np.cos(4 * np.pi * t) + 2
fig, ax = plt.subplots(figsize=(6, 4), tight_layout=True)
ax.plot(t, s)
ax.set_xlabel(r'textbf{time (s)}')
ax.set_ylabel('itshape {Velocity (N{DEGREE SIGN}/sec)}', fontsize=16)
ax.set_title(r'TeX is Number $displaystylesum_{n=1}^infty'
r'frac{-e^{ipi}}{2^n}$!', fontsize=16, color='r')
plt.show()
This is the Tex example on Matplotlib site.
But, I got this messauntimeError:
latex was not able to process the following string:
'\\itshape {Velocity (\\N{DEGREE SIGN}/sec)}'
Here is the full report generated by latex:
This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=latex)
restricted write18 enabled.
entering extended mode
(/home/joshua/.cache/matplotlib/tex.cache/88a38ed565fe9aac24ebc44c9a0be443.tex
LaTeX2e <2016/02/01>
Babel <3.9q> and hyphenation patterns for 81 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))
(/usr/share/texlive/texmf-dist/tex/latex/type1cm/type1cm.sty)
(/usr/share/texlive/texmf-dist/tex/latex/base/textcomp.sty
(/usr/share/texlive/texmf-dist/tex/latex/base/ts1enc.def))
(/usr/share/texlive/texmf-dist/tex/latex/ucs/ucs.sty
(/usr/share/texlive/texmf-dist/tex/latex/ucs/data/uni-global.def))
(/usr/share/texlive/texmf-dist/tex/latex/base/inputenc.sty
(/usr/share/texlive/texmf-dist/tex/latex/ucs/utf8x.def))
(/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifvtex.sty)
(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty)
Package geometry Warning: Over-specification in `h'-direction.
`width' (5058.9pt) is ignored.
Package geometry Warning: Over-specification in `v'-direction.
`height' (5058.9pt) is ignored.
) (./88a38ed565fe9aac24ebc44c9a0be443.aux)
(/usr/share/texlive/texmf-dist/tex/latex/base/ts1cmr.fd)
(/usr/share/texlive/texmf-dist/tex/latex/ucs/ucsencs.def)
*geometry* driver: auto-detecting
*geometry* detected driver: dvips
LaTeX Font Warning: Font shape `OT1/cmss/m/it' in size <16> not available
(Font) Font shape `OT1/cmss/m/sl' tried instead on input line 15.
! Undefined control sequence.
l.15 ...0.000000}{sffamily itshape {Velocity (N
{DEGREE SIGN}/sec)}}
No pages of output.
Transcript written on 88a38ed565fe9aac24ebc44c9a0be443.log.ge over and over.
Is there anyone to solve this problem?
matplotlib
matplotlib
New contributor
New contributor
edited 42 mins ago
CarLaTeX
27.5k445120
27.5k445120
New contributor
asked 46 mins ago
joshua
1
1
New contributor
New contributor
1
Welcome to TeX.SE!N
is interpreted as a command by LaTeX, which is not defined. I don't know Matplotlib, could you add the LaTeX code generated by it?
– CarLaTeX
35 mins ago
add a comment |
1
Welcome to TeX.SE!N
is interpreted as a command by LaTeX, which is not defined. I don't know Matplotlib, could you add the LaTeX code generated by it?
– CarLaTeX
35 mins ago
1
1
Welcome to TeX.SE!
N
is interpreted as a command by LaTeX, which is not defined. I don't know Matplotlib, could you add the LaTeX code generated by it?– CarLaTeX
35 mins ago
Welcome to TeX.SE!
N
is interpreted as a command by LaTeX, which is not defined. I don't know Matplotlib, could you add the LaTeX code generated by it?– CarLaTeX
35 mins ago
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
joshua is a new contributor. Be nice, and check out our Code of Conduct.
joshua is a new contributor. Be nice, and check out our Code of Conduct.
joshua is a new contributor. Be nice, and check out our Code of Conduct.
joshua is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f461367%2fthe-one-of-the-matploltlib-example%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Welcome to TeX.SE!
N
is interpreted as a command by LaTeX, which is not defined. I don't know Matplotlib, could you add the LaTeX code generated by it?– CarLaTeX
35 mins ago