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?










share|improve this question









New contributor




joshua is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 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

















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?










share|improve this question









New contributor




joshua is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 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















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?










share|improve this question









New contributor




joshua is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











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






share|improve this question









New contributor




joshua is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




joshua is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 42 mins ago









CarLaTeX

27.5k445120




27.5k445120






New contributor




joshua is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 46 mins ago









joshua

1




1




New contributor




joshua is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





joshua is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






joshua is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








  • 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




    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

















active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});






joshua is a new contributor. Be nice, and check out our Code of Conduct.










 

draft saved


draft discarded


















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






























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.










 

draft saved


draft discarded


















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.















 


draft saved


draft discarded














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





















































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







Popular posts from this blog

Contact image not getting when fetch all contact list from iPhone by CNContact

count number of partitions of a set with n elements into k subsets

A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks