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

Nth term of Van Eck Sequence

Threading data on TimeSeries

How can religions without a hell discourage evil-doing?

100-doors puzzle

How can this shape perfectly cover a cube?

Is it unethical to quit my job during company crisis?

Why does MAGMA claim that the automorphism group of an elliptic curve is order 24 when it is order 12?

Is there a risk to write an invitation letter for a stranger to obtain a Czech (Schengen) visa?

Having some issue with notation in a Hilbert space

Should I worry about having my credit pulled multiple times while car shopping?

How did the European Union reach the figure of 3% as a maximum allowed deficit?

What does the output current rating from an H-Bridge's datasheet really mean?

When is the phrase "j'ai bon" used?

Can a 40amp breaker be used safely and without issue with a 40amp device on 6AWG wire?

What is the color associated with lukewarm?

The last tree in the Universe

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?

Converting 3x7 to a 1x7. Is it possible with only existing parts?

Difference between sizeof(struct name_of_struct) vs sizeof(name_of_struct)?

Arcane Tradition and Cost Efficiency: Learn spells on level-up, or learn them from scrolls/spellbooks?

Does PC weight have a mechanical effect?

For Saintsbury, which English novelists constituted the "great quartet of the mid-eighteenth century"?

Print the phrase "And she said, 'But that's his.'" using only the alphabet



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;








3















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:



begintikzpicture[scale = 1]
beginaxis[
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));
endaxis
endtikzpicture


But here's what I get:



enter image description here



I tried with other functions, still have problems.
For example, if I just plot sqrt(x), here's what I get:



enter image description here



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 :)










share|improve this question









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 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





    Possibly the values are off too because you didn't specify the (correct) pgfplotssetcompatibility (which is why it's important to provide a fully functional MWE ;).

    – JJM Driessen
    8 hours ago


















3















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:



begintikzpicture[scale = 1]
beginaxis[
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));
endaxis
endtikzpicture


But here's what I get:



enter image description here



I tried with other functions, still have problems.
For example, if I just plot sqrt(x), here's what I get:



enter image description here



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 :)










share|improve this question









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 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





    Possibly the values are off too because you didn't specify the (correct) pgfplotssetcompatibility (which is why it's important to provide a fully functional MWE ;).

    – JJM Driessen
    8 hours ago














3












3








3








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:



begintikzpicture[scale = 1]
beginaxis[
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));
endaxis
endtikzpicture


But here's what I get:



enter image description here



I tried with other functions, still have problems.
For example, if I just plot sqrt(x), here's what I get:



enter image description here



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 :)










share|improve this question









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:



begintikzpicture[scale = 1]
beginaxis[
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));
endaxis
endtikzpicture


But here's what I get:



enter image description here



I tried with other functions, still have problems.
For example, if I just plot sqrt(x), here's what I get:



enter image description here



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






share|improve this question









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.










share|improve this question









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.








share|improve this question




share|improve this question








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 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





    Possibly the values are off too because you didn't specify the (correct) pgfplotssetcompatibility (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







  • 2





    Possibly the values are off too because you didn't specify the (correct) pgfplotssetcompatibility (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) pgfplotssetcompatibility (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) pgfplotssetcompatibility (which is why it's important to provide a fully functional MWE ;).

– JJM Driessen
8 hours ago











2 Answers
2






active

oldest

votes


















8














Diagram of the function 1/sqrt(x) is the following:



enter image description here



In your MWE you have mix of pgfplotsand plain tikz syntax. Better is stick to just one of them. For example to pgfplots:



documentclass[border=3mm]standalone% <-- changed
usepackagepgfplots
pgfplotssetcompat=1.16

begindocument
begintikzpicture
beginaxis
ymin=0, ymax=1,
axis lines=center,
]
addplot [thick, domain=0:100, samples=100] 1/sqrt(x);
endaxis
endtikzpicture
enddocument





share|improve this answer

























  • Oh, ok, thanks for the answer. I tried it, it works great! :)

    – Arthur
    8 hours ago


















4














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
usepackagepgfplots
pgfplotssetcompat=1.16
begindocument
begintikzpicture[scale = 1]
beginaxis[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);
endaxis
endtikzpicture
enddocument


enter image description here






share|improve this answer























  • Thanks for both your answers. Both work really well, I really appreciate it. Have a nice evening!

    – Arthur
    8 hours ago











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.









draft saved

draft discarded


















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









8














Diagram of the function 1/sqrt(x) is the following:



enter image description here



In your MWE you have mix of pgfplotsand plain tikz syntax. Better is stick to just one of them. For example to pgfplots:



documentclass[border=3mm]standalone% <-- changed
usepackagepgfplots
pgfplotssetcompat=1.16

begindocument
begintikzpicture
beginaxis
ymin=0, ymax=1,
axis lines=center,
]
addplot [thick, domain=0:100, samples=100] 1/sqrt(x);
endaxis
endtikzpicture
enddocument





share|improve this answer

























  • Oh, ok, thanks for the answer. I tried it, it works great! :)

    – Arthur
    8 hours ago















8














Diagram of the function 1/sqrt(x) is the following:



enter image description here



In your MWE you have mix of pgfplotsand plain tikz syntax. Better is stick to just one of them. For example to pgfplots:



documentclass[border=3mm]standalone% <-- changed
usepackagepgfplots
pgfplotssetcompat=1.16

begindocument
begintikzpicture
beginaxis
ymin=0, ymax=1,
axis lines=center,
]
addplot [thick, domain=0:100, samples=100] 1/sqrt(x);
endaxis
endtikzpicture
enddocument





share|improve this answer

























  • Oh, ok, thanks for the answer. I tried it, it works great! :)

    – Arthur
    8 hours ago













8












8








8







Diagram of the function 1/sqrt(x) is the following:



enter image description here



In your MWE you have mix of pgfplotsand plain tikz syntax. Better is stick to just one of them. For example to pgfplots:



documentclass[border=3mm]standalone% <-- changed
usepackagepgfplots
pgfplotssetcompat=1.16

begindocument
begintikzpicture
beginaxis
ymin=0, ymax=1,
axis lines=center,
]
addplot [thick, domain=0:100, samples=100] 1/sqrt(x);
endaxis
endtikzpicture
enddocument





share|improve this answer















Diagram of the function 1/sqrt(x) is the following:



enter image description here



In your MWE you have mix of pgfplotsand plain tikz syntax. Better is stick to just one of them. For example to pgfplots:



documentclass[border=3mm]standalone% <-- changed
usepackagepgfplots
pgfplotssetcompat=1.16

begindocument
begintikzpicture
beginaxis
ymin=0, ymax=1,
axis lines=center,
]
addplot [thick, domain=0:100, samples=100] 1/sqrt(x);
endaxis
endtikzpicture
enddocument






share|improve this answer














share|improve this answer



share|improve this answer








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

















  • 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













4














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
usepackagepgfplots
pgfplotssetcompat=1.16
begindocument
begintikzpicture[scale = 1]
beginaxis[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);
endaxis
endtikzpicture
enddocument


enter image description here






share|improve this answer























  • Thanks for both your answers. Both work really well, I really appreciate it. Have a nice evening!

    – Arthur
    8 hours ago















4














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
usepackagepgfplots
pgfplotssetcompat=1.16
begindocument
begintikzpicture[scale = 1]
beginaxis[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);
endaxis
endtikzpicture
enddocument


enter image description here






share|improve this answer























  • Thanks for both your answers. Both work really well, I really appreciate it. Have a nice evening!

    – Arthur
    8 hours ago













4












4








4







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
usepackagepgfplots
pgfplotssetcompat=1.16
begindocument
begintikzpicture[scale = 1]
beginaxis[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);
endaxis
endtikzpicture
enddocument


enter image description here






share|improve this answer













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
usepackagepgfplots
pgfplotssetcompat=1.16
begindocument
begintikzpicture[scale = 1]
beginaxis[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);
endaxis
endtikzpicture
enddocument


enter image description here







share|improve this answer












share|improve this answer



share|improve this answer










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

















  • 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










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









draft saved

draft discarded


















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.




draft saved


draft discarded














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





















































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

ParseJSON using SSJSUsing AMPscript with SSJS ActivitiesHow to resubscribe a user in Marketing cloud using SSJS?Pulling Subscriber Status from Lists using SSJSRetrieving Emails using SSJSProblem in updating DE using SSJSUsing SSJS to send single email in Marketing CloudError adding EmailSendDefinition using SSJS

Кампала Садржај Географија Географија Историја Становништво Привреда Партнерски градови Референце Спољашње везе Мени за навигацију0°11′ СГШ; 32°20′ ИГД / 0.18° СГШ; 32.34° ИГД / 0.18; 32.340°11′ СГШ; 32°20′ ИГД / 0.18° СГШ; 32.34° ИГД / 0.18; 32.34МедијиПодациЗванични веб-сајту

19. јануар Садржај Догађаји Рођења Смрти Празници и дани сећања Види још Референце Мени за навигацијуу