TiKZ won't graph 1/sqrt(x)Path won't show up in tikzTikz and directed graphtikz-Graph problemTikZ manual...
How do I become a better writer when I hate reading?
Idiom for 'person who gets violent when drunk"
Using roof rails to set up hammock
What made the Ancient One do this in Endgame?
The title "Mord mit Aussicht" explained
Converting 3x7 to a 1x7. Is it possible with only existing parts?
How could I create a situation in which a PC has to make a saving throw or be forced to pet a dog?
Does PC weight have a mechanical effect?
Having some issue with notation in a Hilbert space
For Saintsbury, which English novelists constituted the "great quartet of the mid-eighteenth century"?
Background for black and white chart
Creating polygon with exact measurements in QGIS 3
New Site Design!
Can artificial satellite positions affect tides?
Will users know a CardView is clickable
Does WiFi affect the quality of images downloaded from the internet?
Why does MAGMA claim that the automorphism group of an elliptic curve is order 24 when it is order 12?
Difference between sizeof(struct name_of_struct) vs sizeof(name_of_struct)?
Is it unethical to quit my job during company crisis?
Print the phrase "And she said, 'But that's his.'" using only the alphabet
Can I give my friend the sour dough "throw away" as a starter to their sourdough starter?
How can the US president give an order to a civilian?
How many times to repeat an event with known probability before it has occurred a number of times
Is it a bad idea to have an pen name with only an initial for a surname?
TiKZ won't graph 1/sqrt(x)
Path won't show up in tikzTikz and directed graphtikz-Graph problemTikZ manual example won't compileText in Tikz GraphHow to prevent rounded and duplicated tick labels in pgfplots with fixed precision?TikZ with sqrt( ) functionTikz graph errorTIkZ-pic (with sub-pics) won't scaleTikz Graph naming
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
Evening!
Posting a quick message here cause I have a small problem with TiKZ. I've been trying to plot the function 1/sqrt(x), and it just... won't work.
Here is the code I've been typing:
begin{tikzpicture}[scale = 1]
begin{axis}[
domain=0:100,
xscale=1,yscale=1,
xmin=0, xmax=100,
ymin=0, ymax= 1,
samples=10000,
axis lines=center,
]
draw[thick, samples = 1000, blue] plot[domain=0:100] ({x, 1/sqrt(x)});
end{axis}
end{tikzpicture}
But here's what I get:
I tried with other functions, still have problems.
For example, if I just plot sqrt(x), here's what I get:
At least, the shape is now right... but the values are completely off.
So if anyone should have any idea on how to correct that code, I'd be really grateful, thanks :)
tikz-pgf
New contributor
Arthur is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
Evening!
Posting a quick message here cause I have a small problem with TiKZ. I've been trying to plot the function 1/sqrt(x), and it just... won't work.
Here is the code I've been typing:
begin{tikzpicture}[scale = 1]
begin{axis}[
domain=0:100,
xscale=1,yscale=1,
xmin=0, xmax=100,
ymin=0, ymax= 1,
samples=10000,
axis lines=center,
]
draw[thick, samples = 1000, blue] plot[domain=0:100] ({x, 1/sqrt(x)});
end{axis}
end{tikzpicture}
But here's what I get:
I tried with other functions, still have problems.
For example, if I just plot sqrt(x), here's what I get:
At least, the shape is now right... but the values are completely off.
So if anyone should have any idea on how to correct that code, I'd be really grateful, thanks :)
tikz-pgf
New contributor
Arthur is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Welcome to TeX-SE!1/sqrt(x)
has a singularity at 0 and should fall for largerx
. But the technical reason why it does not work is that you set the braces wrongly,(x,{ 1/sqrt(x)})
is correct but still has the singularity.
– marmot
8 hours ago
2
Possibly the values are off too because you didn't specify the (correct)pgfplotsset
compatibility (which is why it's important to provide a fully functional MWE ;).
– JJM Driessen
8 hours ago
add a comment |
Evening!
Posting a quick message here cause I have a small problem with TiKZ. I've been trying to plot the function 1/sqrt(x), and it just... won't work.
Here is the code I've been typing:
begin{tikzpicture}[scale = 1]
begin{axis}[
domain=0:100,
xscale=1,yscale=1,
xmin=0, xmax=100,
ymin=0, ymax= 1,
samples=10000,
axis lines=center,
]
draw[thick, samples = 1000, blue] plot[domain=0:100] ({x, 1/sqrt(x)});
end{axis}
end{tikzpicture}
But here's what I get:
I tried with other functions, still have problems.
For example, if I just plot sqrt(x), here's what I get:
At least, the shape is now right... but the values are completely off.
So if anyone should have any idea on how to correct that code, I'd be really grateful, thanks :)
tikz-pgf
New contributor
Arthur is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Evening!
Posting a quick message here cause I have a small problem with TiKZ. I've been trying to plot the function 1/sqrt(x), and it just... won't work.
Here is the code I've been typing:
begin{tikzpicture}[scale = 1]
begin{axis}[
domain=0:100,
xscale=1,yscale=1,
xmin=0, xmax=100,
ymin=0, ymax= 1,
samples=10000,
axis lines=center,
]
draw[thick, samples = 1000, blue] plot[domain=0:100] ({x, 1/sqrt(x)});
end{axis}
end{tikzpicture}
But here's what I get:
I tried with other functions, still have problems.
For example, if I just plot sqrt(x), here's what I get:
At least, the shape is now right... but the values are completely off.
So if anyone should have any idea on how to correct that code, I'd be really grateful, thanks :)
tikz-pgf
tikz-pgf
New contributor
Arthur is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Arthur is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
edited 8 hours ago


Phelype Oleinik
29.7k64998
29.7k64998
New contributor
Arthur is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 8 hours ago
ArthurArthur
184
184
New contributor
Arthur is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Arthur is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Welcome to TeX-SE!1/sqrt(x)
has a singularity at 0 and should fall for largerx
. But the technical reason why it does not work is that you set the braces wrongly,(x,{ 1/sqrt(x)})
is correct but still has the singularity.
– marmot
8 hours ago
2
Possibly the values are off too because you didn't specify the (correct)pgfplotsset
compatibility (which is why it's important to provide a fully functional MWE ;).
– JJM Driessen
8 hours ago
add a comment |
Welcome to TeX-SE!1/sqrt(x)
has a singularity at 0 and should fall for largerx
. But the technical reason why it does not work is that you set the braces wrongly,(x,{ 1/sqrt(x)})
is correct but still has the singularity.
– marmot
8 hours ago
2
Possibly the values are off too because you didn't specify the (correct)pgfplotsset
compatibility (which is why it's important to provide a fully functional MWE ;).
– JJM Driessen
8 hours ago
Welcome to TeX-SE!
1/sqrt(x)
has a singularity at 0 and should fall for larger x
. But the technical reason why it does not work is that you set the braces wrongly, (x,{ 1/sqrt(x)})
is correct but still has the singularity.– marmot
8 hours ago
Welcome to TeX-SE!
1/sqrt(x)
has a singularity at 0 and should fall for larger x
. But the technical reason why it does not work is that you set the braces wrongly, (x,{ 1/sqrt(x)})
is correct but still has the singularity.– marmot
8 hours ago
2
2
Possibly the values are off too because you didn't specify the (correct)
pgfplotsset
compatibility (which is why it's important to provide a fully functional MWE ;).– JJM Driessen
8 hours ago
Possibly the values are off too because you didn't specify the (correct)
pgfplotsset
compatibility (which is why it's important to provide a fully functional MWE ;).– JJM Driessen
8 hours ago
add a comment |
2 Answers
2
active
oldest
votes
Diagram of the function 1/sqrt(x)
is the following:
In your MWE you have mix of pgfplots
and plain tikz
syntax. Better is stick to just one of them. For example to pgfplots
:
documentclass[border=3mm]{standalone}% <-- changed
usepackage{pgfplots}
pgfplotsset{compat=1.16}
begin{document}
begin{tikzpicture}
begin{axis}
ymin=0, ymax=1,
axis lines=center,
]
addplot [thick, domain=0:100, samples=100] {1/sqrt(x)};
end{axis}
end{tikzpicture}
end{document}
Oh, ok, thanks for the answer. I tried it, it works great! :)
– Arthur
8 hours ago
add a comment |
As mentioned in the comments above, the syntax was incorrect. Since you seem to be using pgfplots
, here is the way to do it. I exclude the singularity, and in pgfplots
there is no need to put a backslash before x
. Also I reduced the number of samples.
documentclass[tikz,border=3.14mm]{standalone}
usepackage{pgfplots}
pgfplotsset{compat=1.16}
begin{document}
begin{tikzpicture}[scale = 1]
begin{axis}[domain=0:100,
xscale=1,yscale=1,
xmin=0, xmax=100,
ymin=0, ymax= 1,
samples=501,
axis lines=center,
]
addplot[domain=0.0001:100] {1/sqrt(x)};
end{axis}
end{tikzpicture}
end{document}
Thanks for both your answers. Both work really well, I really appreciate it. Have a nice evening!
– Arthur
8 hours ago
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
});
}
});
Arthur 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%2f495683%2ftikz-wont-graph-1-sqrtx%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
Diagram of the function 1/sqrt(x)
is the following:
In your MWE you have mix of pgfplots
and plain tikz
syntax. Better is stick to just one of them. For example to pgfplots
:
documentclass[border=3mm]{standalone}% <-- changed
usepackage{pgfplots}
pgfplotsset{compat=1.16}
begin{document}
begin{tikzpicture}
begin{axis}
ymin=0, ymax=1,
axis lines=center,
]
addplot [thick, domain=0:100, samples=100] {1/sqrt(x)};
end{axis}
end{tikzpicture}
end{document}
Oh, ok, thanks for the answer. I tried it, it works great! :)
– Arthur
8 hours ago
add a comment |
Diagram of the function 1/sqrt(x)
is the following:
In your MWE you have mix of pgfplots
and plain tikz
syntax. Better is stick to just one of them. For example to pgfplots
:
documentclass[border=3mm]{standalone}% <-- changed
usepackage{pgfplots}
pgfplotsset{compat=1.16}
begin{document}
begin{tikzpicture}
begin{axis}
ymin=0, ymax=1,
axis lines=center,
]
addplot [thick, domain=0:100, samples=100] {1/sqrt(x)};
end{axis}
end{tikzpicture}
end{document}
Oh, ok, thanks for the answer. I tried it, it works great! :)
– Arthur
8 hours ago
add a comment |
Diagram of the function 1/sqrt(x)
is the following:
In your MWE you have mix of pgfplots
and plain tikz
syntax. Better is stick to just one of them. For example to pgfplots
:
documentclass[border=3mm]{standalone}% <-- changed
usepackage{pgfplots}
pgfplotsset{compat=1.16}
begin{document}
begin{tikzpicture}
begin{axis}
ymin=0, ymax=1,
axis lines=center,
]
addplot [thick, domain=0:100, samples=100] {1/sqrt(x)};
end{axis}
end{tikzpicture}
end{document}
Diagram of the function 1/sqrt(x)
is the following:
In your MWE you have mix of pgfplots
and plain tikz
syntax. Better is stick to just one of them. For example to pgfplots
:
documentclass[border=3mm]{standalone}% <-- changed
usepackage{pgfplots}
pgfplotsset{compat=1.16}
begin{document}
begin{tikzpicture}
begin{axis}
ymin=0, ymax=1,
axis lines=center,
]
addplot [thick, domain=0:100, samples=100] {1/sqrt(x)};
end{axis}
end{tikzpicture}
end{document}
edited 8 hours ago
answered 8 hours ago
ZarkoZarko
137k872181
137k872181
Oh, ok, thanks for the answer. I tried it, it works great! :)
– Arthur
8 hours ago
add a comment |
Oh, ok, thanks for the answer. I tried it, it works great! :)
– Arthur
8 hours ago
Oh, ok, thanks for the answer. I tried it, it works great! :)
– Arthur
8 hours ago
Oh, ok, thanks for the answer. I tried it, it works great! :)
– Arthur
8 hours ago
add a comment |
As mentioned in the comments above, the syntax was incorrect. Since you seem to be using pgfplots
, here is the way to do it. I exclude the singularity, and in pgfplots
there is no need to put a backslash before x
. Also I reduced the number of samples.
documentclass[tikz,border=3.14mm]{standalone}
usepackage{pgfplots}
pgfplotsset{compat=1.16}
begin{document}
begin{tikzpicture}[scale = 1]
begin{axis}[domain=0:100,
xscale=1,yscale=1,
xmin=0, xmax=100,
ymin=0, ymax= 1,
samples=501,
axis lines=center,
]
addplot[domain=0.0001:100] {1/sqrt(x)};
end{axis}
end{tikzpicture}
end{document}
Thanks for both your answers. Both work really well, I really appreciate it. Have a nice evening!
– Arthur
8 hours ago
add a comment |
As mentioned in the comments above, the syntax was incorrect. Since you seem to be using pgfplots
, here is the way to do it. I exclude the singularity, and in pgfplots
there is no need to put a backslash before x
. Also I reduced the number of samples.
documentclass[tikz,border=3.14mm]{standalone}
usepackage{pgfplots}
pgfplotsset{compat=1.16}
begin{document}
begin{tikzpicture}[scale = 1]
begin{axis}[domain=0:100,
xscale=1,yscale=1,
xmin=0, xmax=100,
ymin=0, ymax= 1,
samples=501,
axis lines=center,
]
addplot[domain=0.0001:100] {1/sqrt(x)};
end{axis}
end{tikzpicture}
end{document}
Thanks for both your answers. Both work really well, I really appreciate it. Have a nice evening!
– Arthur
8 hours ago
add a comment |
As mentioned in the comments above, the syntax was incorrect. Since you seem to be using pgfplots
, here is the way to do it. I exclude the singularity, and in pgfplots
there is no need to put a backslash before x
. Also I reduced the number of samples.
documentclass[tikz,border=3.14mm]{standalone}
usepackage{pgfplots}
pgfplotsset{compat=1.16}
begin{document}
begin{tikzpicture}[scale = 1]
begin{axis}[domain=0:100,
xscale=1,yscale=1,
xmin=0, xmax=100,
ymin=0, ymax= 1,
samples=501,
axis lines=center,
]
addplot[domain=0.0001:100] {1/sqrt(x)};
end{axis}
end{tikzpicture}
end{document}
As mentioned in the comments above, the syntax was incorrect. Since you seem to be using pgfplots
, here is the way to do it. I exclude the singularity, and in pgfplots
there is no need to put a backslash before x
. Also I reduced the number of samples.
documentclass[tikz,border=3.14mm]{standalone}
usepackage{pgfplots}
pgfplotsset{compat=1.16}
begin{document}
begin{tikzpicture}[scale = 1]
begin{axis}[domain=0:100,
xscale=1,yscale=1,
xmin=0, xmax=100,
ymin=0, ymax= 1,
samples=501,
axis lines=center,
]
addplot[domain=0.0001:100] {1/sqrt(x)};
end{axis}
end{tikzpicture}
end{document}
answered 8 hours ago


marmotmarmot
136k6177325
136k6177325
Thanks for both your answers. Both work really well, I really appreciate it. Have a nice evening!
– Arthur
8 hours ago
add a comment |
Thanks for both your answers. Both work really well, I really appreciate it. Have a nice evening!
– Arthur
8 hours ago
Thanks for both your answers. Both work really well, I really appreciate it. Have a nice evening!
– Arthur
8 hours ago
Thanks for both your answers. Both work really well, I really appreciate it. Have a nice evening!
– Arthur
8 hours ago
add a comment |
Arthur is a new contributor. Be nice, and check out our Code of Conduct.
Arthur is a new contributor. Be nice, and check out our Code of Conduct.
Arthur is a new contributor. Be nice, and check out our Code of Conduct.
Arthur is a new contributor. Be nice, and check out our Code of Conduct.
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%2f495683%2ftikz-wont-graph-1-sqrtx%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
Welcome to TeX-SE!
1/sqrt(x)
has a singularity at 0 and should fall for largerx
. But the technical reason why it does not work is that you set the braces wrongly,(x,{ 1/sqrt(x)})
is correct but still has the singularity.– marmot
8 hours ago
2
Possibly the values are off too because you didn't specify the (correct)
pgfplotsset
compatibility (which is why it's important to provide a fully functional MWE ;).– JJM Driessen
8 hours ago