Plotting the arctanh
I've been trying to plot the arctanh function for a while now
documentclass{article}
usepackage{tikz}
usepackage{pgfplots}
begin{document}
pgfkeys{/pgf/declare function={arctanh(x) = 0.5*ln(1+x)/ln(1-x);}}
vspace{1cm}
begin{tikzpicture}[trim axis left]
begin{axis}[
xmin=-1, xmax=1,
ymin=-1, ymax=1,
samples=100,
enlarge x limits=false,
grid=both,
no markers,
axis equal]
addplot +[thick] {arctanh(x)};
end{axis}
end{tikzpicture}
end{document}
but it doesn't look right, what am I doing wrong?
tikz-pgf
add a comment |
I've been trying to plot the arctanh function for a while now
documentclass{article}
usepackage{tikz}
usepackage{pgfplots}
begin{document}
pgfkeys{/pgf/declare function={arctanh(x) = 0.5*ln(1+x)/ln(1-x);}}
vspace{1cm}
begin{tikzpicture}[trim axis left]
begin{axis}[
xmin=-1, xmax=1,
ymin=-1, ymax=1,
samples=100,
enlarge x limits=false,
grid=both,
no markers,
axis equal]
addplot +[thick] {arctanh(x)};
end{axis}
end{tikzpicture}
end{document}
but it doesn't look right, what am I doing wrong?
tikz-pgf
add a comment |
I've been trying to plot the arctanh function for a while now
documentclass{article}
usepackage{tikz}
usepackage{pgfplots}
begin{document}
pgfkeys{/pgf/declare function={arctanh(x) = 0.5*ln(1+x)/ln(1-x);}}
vspace{1cm}
begin{tikzpicture}[trim axis left]
begin{axis}[
xmin=-1, xmax=1,
ymin=-1, ymax=1,
samples=100,
enlarge x limits=false,
grid=both,
no markers,
axis equal]
addplot +[thick] {arctanh(x)};
end{axis}
end{tikzpicture}
end{document}
but it doesn't look right, what am I doing wrong?
tikz-pgf
I've been trying to plot the arctanh function for a while now
documentclass{article}
usepackage{tikz}
usepackage{pgfplots}
begin{document}
pgfkeys{/pgf/declare function={arctanh(x) = 0.5*ln(1+x)/ln(1-x);}}
vspace{1cm}
begin{tikzpicture}[trim axis left]
begin{axis}[
xmin=-1, xmax=1,
ymin=-1, ymax=1,
samples=100,
enlarge x limits=false,
grid=both,
no markers,
axis equal]
addplot +[thick] {arctanh(x)};
end{axis}
end{tikzpicture}
end{document}
but it doesn't look right, what am I doing wrong?
tikz-pgf
tikz-pgf
asked Dec 19 '18 at 9:47
Three DiagThree Diag
20927
20927
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
It does not look right because there is a small mistake in the definition of arctanh
.
documentclass{article}
usepackage{tikz}
usepackage{pgfplots}
begin{document}
pgfkeys{/pgf/declare function={arctanh(x) = 0.5*(ln(1+x)-ln(1-x));}}
vspace{1cm}
begin{tikzpicture}[trim axis left]
begin{axis}[
xmin=-1, xmax=1,
ymin=-1, ymax=1,
samples=100,
enlarge x limits=false,
grid=both,
no markers,
axis equal]
addplot +[thick] {arctanh(x)};
end{axis}
end{tikzpicture}
end{document}
Or, a somewhat closer representations to yours and a domain that avoids the warnings.
documentclass{article}
usepackage{tikz}
usepackage{pgfplots}
pgfplotsset{compat=1.16}
begin{document}
pgfkeys{/pgf/declare function={arctanh(x) = 0.5*(ln((1+x)/(1-x)));}}
vspace{1cm}
begin{tikzpicture}[trim axis left]
begin{axis}[
xmin=-1, xmax=1,
ymin=-1, ymax=1,
samples=100,
enlarge x limits=false,
grid=both,
no markers,
axis equal]
addplot +[thick,domain=-0.99:0.99] {arctanh(x)};
end{axis}
end{tikzpicture}
end{document}
add a comment |
For comparism purpose: run with xelatex
documentclass{article}
usepackage{pstricks,pst-math,pst-plot}
begin{document}
begin{pspicture}[algebraic](-5,-4)(5,4)
psaxes{->}(0,0)(-5,-4)(5,4)
psplot[linewidth=1.5pt,linecolor=blue]{1}{5}{ACOSH(x)}
psplot[linewidth=1.5pt,linecolor=red]{-5}{5}{ASINH(x)}
psplot[linewidth=1.5pt,linecolor=green]{-.999}{.999}{ATANH(x)}
end{pspicture}
end{document}
add a comment |
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',
autoActivateHeartbeat: false,
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
});
}
});
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%2f466501%2fplotting-the-arctanh%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
It does not look right because there is a small mistake in the definition of arctanh
.
documentclass{article}
usepackage{tikz}
usepackage{pgfplots}
begin{document}
pgfkeys{/pgf/declare function={arctanh(x) = 0.5*(ln(1+x)-ln(1-x));}}
vspace{1cm}
begin{tikzpicture}[trim axis left]
begin{axis}[
xmin=-1, xmax=1,
ymin=-1, ymax=1,
samples=100,
enlarge x limits=false,
grid=both,
no markers,
axis equal]
addplot +[thick] {arctanh(x)};
end{axis}
end{tikzpicture}
end{document}
Or, a somewhat closer representations to yours and a domain that avoids the warnings.
documentclass{article}
usepackage{tikz}
usepackage{pgfplots}
pgfplotsset{compat=1.16}
begin{document}
pgfkeys{/pgf/declare function={arctanh(x) = 0.5*(ln((1+x)/(1-x)));}}
vspace{1cm}
begin{tikzpicture}[trim axis left]
begin{axis}[
xmin=-1, xmax=1,
ymin=-1, ymax=1,
samples=100,
enlarge x limits=false,
grid=both,
no markers,
axis equal]
addplot +[thick,domain=-0.99:0.99] {arctanh(x)};
end{axis}
end{tikzpicture}
end{document}
add a comment |
It does not look right because there is a small mistake in the definition of arctanh
.
documentclass{article}
usepackage{tikz}
usepackage{pgfplots}
begin{document}
pgfkeys{/pgf/declare function={arctanh(x) = 0.5*(ln(1+x)-ln(1-x));}}
vspace{1cm}
begin{tikzpicture}[trim axis left]
begin{axis}[
xmin=-1, xmax=1,
ymin=-1, ymax=1,
samples=100,
enlarge x limits=false,
grid=both,
no markers,
axis equal]
addplot +[thick] {arctanh(x)};
end{axis}
end{tikzpicture}
end{document}
Or, a somewhat closer representations to yours and a domain that avoids the warnings.
documentclass{article}
usepackage{tikz}
usepackage{pgfplots}
pgfplotsset{compat=1.16}
begin{document}
pgfkeys{/pgf/declare function={arctanh(x) = 0.5*(ln((1+x)/(1-x)));}}
vspace{1cm}
begin{tikzpicture}[trim axis left]
begin{axis}[
xmin=-1, xmax=1,
ymin=-1, ymax=1,
samples=100,
enlarge x limits=false,
grid=both,
no markers,
axis equal]
addplot +[thick,domain=-0.99:0.99] {arctanh(x)};
end{axis}
end{tikzpicture}
end{document}
add a comment |
It does not look right because there is a small mistake in the definition of arctanh
.
documentclass{article}
usepackage{tikz}
usepackage{pgfplots}
begin{document}
pgfkeys{/pgf/declare function={arctanh(x) = 0.5*(ln(1+x)-ln(1-x));}}
vspace{1cm}
begin{tikzpicture}[trim axis left]
begin{axis}[
xmin=-1, xmax=1,
ymin=-1, ymax=1,
samples=100,
enlarge x limits=false,
grid=both,
no markers,
axis equal]
addplot +[thick] {arctanh(x)};
end{axis}
end{tikzpicture}
end{document}
Or, a somewhat closer representations to yours and a domain that avoids the warnings.
documentclass{article}
usepackage{tikz}
usepackage{pgfplots}
pgfplotsset{compat=1.16}
begin{document}
pgfkeys{/pgf/declare function={arctanh(x) = 0.5*(ln((1+x)/(1-x)));}}
vspace{1cm}
begin{tikzpicture}[trim axis left]
begin{axis}[
xmin=-1, xmax=1,
ymin=-1, ymax=1,
samples=100,
enlarge x limits=false,
grid=both,
no markers,
axis equal]
addplot +[thick,domain=-0.99:0.99] {arctanh(x)};
end{axis}
end{tikzpicture}
end{document}
It does not look right because there is a small mistake in the definition of arctanh
.
documentclass{article}
usepackage{tikz}
usepackage{pgfplots}
begin{document}
pgfkeys{/pgf/declare function={arctanh(x) = 0.5*(ln(1+x)-ln(1-x));}}
vspace{1cm}
begin{tikzpicture}[trim axis left]
begin{axis}[
xmin=-1, xmax=1,
ymin=-1, ymax=1,
samples=100,
enlarge x limits=false,
grid=both,
no markers,
axis equal]
addplot +[thick] {arctanh(x)};
end{axis}
end{tikzpicture}
end{document}
Or, a somewhat closer representations to yours and a domain that avoids the warnings.
documentclass{article}
usepackage{tikz}
usepackage{pgfplots}
pgfplotsset{compat=1.16}
begin{document}
pgfkeys{/pgf/declare function={arctanh(x) = 0.5*(ln((1+x)/(1-x)));}}
vspace{1cm}
begin{tikzpicture}[trim axis left]
begin{axis}[
xmin=-1, xmax=1,
ymin=-1, ymax=1,
samples=100,
enlarge x limits=false,
grid=both,
no markers,
axis equal]
addplot +[thick,domain=-0.99:0.99] {arctanh(x)};
end{axis}
end{tikzpicture}
end{document}
answered Dec 19 '18 at 12:25
marmotmarmot
91.2k4105198
91.2k4105198
add a comment |
add a comment |
For comparism purpose: run with xelatex
documentclass{article}
usepackage{pstricks,pst-math,pst-plot}
begin{document}
begin{pspicture}[algebraic](-5,-4)(5,4)
psaxes{->}(0,0)(-5,-4)(5,4)
psplot[linewidth=1.5pt,linecolor=blue]{1}{5}{ACOSH(x)}
psplot[linewidth=1.5pt,linecolor=red]{-5}{5}{ASINH(x)}
psplot[linewidth=1.5pt,linecolor=green]{-.999}{.999}{ATANH(x)}
end{pspicture}
end{document}
add a comment |
For comparism purpose: run with xelatex
documentclass{article}
usepackage{pstricks,pst-math,pst-plot}
begin{document}
begin{pspicture}[algebraic](-5,-4)(5,4)
psaxes{->}(0,0)(-5,-4)(5,4)
psplot[linewidth=1.5pt,linecolor=blue]{1}{5}{ACOSH(x)}
psplot[linewidth=1.5pt,linecolor=red]{-5}{5}{ASINH(x)}
psplot[linewidth=1.5pt,linecolor=green]{-.999}{.999}{ATANH(x)}
end{pspicture}
end{document}
add a comment |
For comparism purpose: run with xelatex
documentclass{article}
usepackage{pstricks,pst-math,pst-plot}
begin{document}
begin{pspicture}[algebraic](-5,-4)(5,4)
psaxes{->}(0,0)(-5,-4)(5,4)
psplot[linewidth=1.5pt,linecolor=blue]{1}{5}{ACOSH(x)}
psplot[linewidth=1.5pt,linecolor=red]{-5}{5}{ASINH(x)}
psplot[linewidth=1.5pt,linecolor=green]{-.999}{.999}{ATANH(x)}
end{pspicture}
end{document}
For comparism purpose: run with xelatex
documentclass{article}
usepackage{pstricks,pst-math,pst-plot}
begin{document}
begin{pspicture}[algebraic](-5,-4)(5,4)
psaxes{->}(0,0)(-5,-4)(5,4)
psplot[linewidth=1.5pt,linecolor=blue]{1}{5}{ACOSH(x)}
psplot[linewidth=1.5pt,linecolor=red]{-5}{5}{ASINH(x)}
psplot[linewidth=1.5pt,linecolor=green]{-.999}{.999}{ATANH(x)}
end{pspicture}
end{document}
answered Dec 19 '18 at 12:47
HerbertHerbert
271k24409719
271k24409719
add a comment |
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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%2f466501%2fplotting-the-arctanh%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