Can't make parabola without including the tipMacro to draw a parabola with pgf/TikZExample of matrix node in trees in tikzpictureNumerical conditional within tikz keys?Drawing rectilinear curves in Tikz, aka an Etch-a-Sketch drawingExtending a Tikz ParabolaHow to prevent pgf/tikz from drawing a circle as an ellipse when using relative coordinates?How to add additional border on the left and add additional boxes in the right corner with a labelLine up nested tikz enviroments or how to get rid of themSine function in pgfplots and MATLAB. Why are different results obtained?How to invert a parabola bend in TikZ
Can Brexit be undone in an emergency?
Strength of Female Chimpanzees vs. Male Chimpanzees?
Simple way to decompose a lists in a certain way?
What is the origin of the "being immortal sucks" trope?
Plot irregular circle in latex
What is the origin of the “clerics can create water” trope?
Is it safe to unplug a blinking USB drive after 'safely' ejecting it?
Which version of the Pigeonhole principle is correct? One is far stronger than the other
Why are there no programmes / playbills for movies?
What are the end bytes of *.docx file format
Cemented carbide swords - worth it?
Should the pagination be reset when changing the order?
Minimum number of lines to draw 111 squares
Why do we need to use transistors when building an OR gate?
Do household ovens ventilate heat to the outdoors?
How do rulers get rich from war?
How can I check that parent has more than 1 child?
Other than good shoes and a stick, what are some ways to preserve your knees on long hikes?
Inquiry answerer
Applications of mathematics in clinical setting
Floating Point XOR
Is the name of an interval between two notes unique and absolute?
Can one guy with a duplicator trigger a nuclear apocalypse?
How do you determine which representation of a function to use for Newton's method?
Can't make parabola without including the tip
Macro to draw a parabola with pgf/TikZExample of matrix node in trees in tikzpictureNumerical conditional within tikz keys?Drawing rectilinear curves in Tikz, aka an Etch-a-Sketch drawingExtending a Tikz ParabolaHow to prevent pgf/tikz from drawing a circle as an ellipse when using relative coordinates?How to add additional border on the left and add additional boxes in the right corner with a labelLine up nested tikz enviroments or how to get rid of themSine function in pgfplots and MATLAB. Why are different results obtained?How to invert a parabola bend in TikZ
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I am trying to make an absolute value parabola function with TikZ. When I try to create the right and left sides of the parabola(the ones that would be underneath the x-axis in a normal function) I can't without including a bend underneath the x-axis.
taskbegintikzpicture
draw (-10,0)--(10,0);
draw(0,0) parabola bend(-3,6)(-6,0);
draw(0,0) parabola bend(-3,-6)(2,10);
draw(-6,0) parabola bend(-3,-6)(-8,10);
endtikzpicture
tikz-pgf
New contributor
add a comment
|
I am trying to make an absolute value parabola function with TikZ. When I try to create the right and left sides of the parabola(the ones that would be underneath the x-axis in a normal function) I can't without including a bend underneath the x-axis.
taskbegintikzpicture
draw (-10,0)--(10,0);
draw(0,0) parabola bend(-3,6)(-6,0);
draw(0,0) parabola bend(-3,-6)(2,10);
draw(-6,0) parabola bend(-3,-6)(-8,10);
endtikzpicture
tikz-pgf
New contributor
add a comment
|
I am trying to make an absolute value parabola function with TikZ. When I try to create the right and left sides of the parabola(the ones that would be underneath the x-axis in a normal function) I can't without including a bend underneath the x-axis.
taskbegintikzpicture
draw (-10,0)--(10,0);
draw(0,0) parabola bend(-3,6)(-6,0);
draw(0,0) parabola bend(-3,-6)(2,10);
draw(-6,0) parabola bend(-3,-6)(-8,10);
endtikzpicture
tikz-pgf
New contributor
I am trying to make an absolute value parabola function with TikZ. When I try to create the right and left sides of the parabola(the ones that would be underneath the x-axis in a normal function) I can't without including a bend underneath the x-axis.
taskbegintikzpicture
draw (-10,0)--(10,0);
draw(0,0) parabola bend(-3,6)(-6,0);
draw(0,0) parabola bend(-3,-6)(2,10);
draw(-6,0) parabola bend(-3,-6)(-8,10);
endtikzpicture
tikz-pgf
tikz-pgf
New contributor
New contributor
edited 8 hours ago
DiaWaterBender 4u
New contributor
asked 8 hours ago
DiaWaterBender 4uDiaWaterBender 4u
112 bronze badges
112 bronze badges
New contributor
New contributor
add a comment
|
add a comment
|
3 Answers
3
active
oldest
votes
Easiest solution is to draw two parabolas, one upside down, and clip them both to just show the parts above your line:
documentclass[border=3.14,tikz]standalone
begindocument
begintikzpicture
draw (-5,0)--(5,0);
beginscope
clip (-5,0) rectangle (5,6);
draw (-4,6) parabola bend (0,-2) (4,6);
draw (-4,-6) parabola bend (0,2) (4,-6);
endscope
endtikzpicture
enddocument
Approved always very simple solutions. Very good.
– Sebastiano
7 hours ago
add a comment
|
Another simple solution is use the plot
function and define parabola accordingly:
documentclass[tikz,border=3mm]standalone
begindocument
begintikzpicture
draw (-5,0)--(5,0);
draw[semithick, red] plot [domain=-2:2] (2*x,abs(x*x-1));
endtikzpicture
enddocument
This would be much slower, though, and it is dependent on the sample size (in your output one can see kinks in the parabola for instance). For stuff more complicated thanabs(x^2)
this would be the correct approach.
– Skillmon
6 hours ago
add a comment
|
This is really just for fun. You can make TikZ reflect the parabola (or anything you draw) at the x axis (say) automatically. This can be done by installing a nonlinear transformation, which is in this case particularly simple.
documentclass[tikz,border=3mm]standalone
usepgfmodulenonlineartransformations
makeatletter
defyreflect%
pgfmathsetmacromyyabs(pgf@y)%
pgf@y=myy pt
begindocument
begintikzpicture
beginscope[transform shape nonlinear=true]
pgftransformnonlinearyreflect
draw (-5,0)--(5,0);
draw (-4,6) parabola bend (0,-2) (4,6);
endscope
endtikzpicture
enddocument
As one can see, there are small gaps, so the solution is not as perfect as Skillmon's solution.
Please view the picture with 500/100, I feel parabol doesn't cut Ox axis.
– minhthien_2016
4 hours ago
@minhthien_2016 Yes, this is what is meant by "there are small gaps".
– Schrödinger's cat
4 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/4.0/"u003ecc by-sa 4.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
);
);
DiaWaterBender 4u 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%2f508554%2fcant-make-parabola-without-including-the-tip%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
Easiest solution is to draw two parabolas, one upside down, and clip them both to just show the parts above your line:
documentclass[border=3.14,tikz]standalone
begindocument
begintikzpicture
draw (-5,0)--(5,0);
beginscope
clip (-5,0) rectangle (5,6);
draw (-4,6) parabola bend (0,-2) (4,6);
draw (-4,-6) parabola bend (0,2) (4,-6);
endscope
endtikzpicture
enddocument
Approved always very simple solutions. Very good.
– Sebastiano
7 hours ago
add a comment
|
Easiest solution is to draw two parabolas, one upside down, and clip them both to just show the parts above your line:
documentclass[border=3.14,tikz]standalone
begindocument
begintikzpicture
draw (-5,0)--(5,0);
beginscope
clip (-5,0) rectangle (5,6);
draw (-4,6) parabola bend (0,-2) (4,6);
draw (-4,-6) parabola bend (0,2) (4,-6);
endscope
endtikzpicture
enddocument
Approved always very simple solutions. Very good.
– Sebastiano
7 hours ago
add a comment
|
Easiest solution is to draw two parabolas, one upside down, and clip them both to just show the parts above your line:
documentclass[border=3.14,tikz]standalone
begindocument
begintikzpicture
draw (-5,0)--(5,0);
beginscope
clip (-5,0) rectangle (5,6);
draw (-4,6) parabola bend (0,-2) (4,6);
draw (-4,-6) parabola bend (0,2) (4,-6);
endscope
endtikzpicture
enddocument
Easiest solution is to draw two parabolas, one upside down, and clip them both to just show the parts above your line:
documentclass[border=3.14,tikz]standalone
begindocument
begintikzpicture
draw (-5,0)--(5,0);
beginscope
clip (-5,0) rectangle (5,6);
draw (-4,6) parabola bend (0,-2) (4,6);
draw (-4,-6) parabola bend (0,2) (4,-6);
endscope
endtikzpicture
enddocument
edited 7 hours ago
answered 7 hours ago
SkillmonSkillmon
28.1k1 gold badge28 silver badges59 bronze badges
28.1k1 gold badge28 silver badges59 bronze badges
Approved always very simple solutions. Very good.
– Sebastiano
7 hours ago
add a comment
|
Approved always very simple solutions. Very good.
– Sebastiano
7 hours ago
Approved always very simple solutions. Very good.
– Sebastiano
7 hours ago
Approved always very simple solutions. Very good.
– Sebastiano
7 hours ago
add a comment
|
Another simple solution is use the plot
function and define parabola accordingly:
documentclass[tikz,border=3mm]standalone
begindocument
begintikzpicture
draw (-5,0)--(5,0);
draw[semithick, red] plot [domain=-2:2] (2*x,abs(x*x-1));
endtikzpicture
enddocument
This would be much slower, though, and it is dependent on the sample size (in your output one can see kinks in the parabola for instance). For stuff more complicated thanabs(x^2)
this would be the correct approach.
– Skillmon
6 hours ago
add a comment
|
Another simple solution is use the plot
function and define parabola accordingly:
documentclass[tikz,border=3mm]standalone
begindocument
begintikzpicture
draw (-5,0)--(5,0);
draw[semithick, red] plot [domain=-2:2] (2*x,abs(x*x-1));
endtikzpicture
enddocument
This would be much slower, though, and it is dependent on the sample size (in your output one can see kinks in the parabola for instance). For stuff more complicated thanabs(x^2)
this would be the correct approach.
– Skillmon
6 hours ago
add a comment
|
Another simple solution is use the plot
function and define parabola accordingly:
documentclass[tikz,border=3mm]standalone
begindocument
begintikzpicture
draw (-5,0)--(5,0);
draw[semithick, red] plot [domain=-2:2] (2*x,abs(x*x-1));
endtikzpicture
enddocument
Another simple solution is use the plot
function and define parabola accordingly:
documentclass[tikz,border=3mm]standalone
begindocument
begintikzpicture
draw (-5,0)--(5,0);
draw[semithick, red] plot [domain=-2:2] (2*x,abs(x*x-1));
endtikzpicture
enddocument
answered 6 hours ago
ZarkoZarko
147k8 gold badges84 silver badges194 bronze badges
147k8 gold badges84 silver badges194 bronze badges
This would be much slower, though, and it is dependent on the sample size (in your output one can see kinks in the parabola for instance). For stuff more complicated thanabs(x^2)
this would be the correct approach.
– Skillmon
6 hours ago
add a comment
|
This would be much slower, though, and it is dependent on the sample size (in your output one can see kinks in the parabola for instance). For stuff more complicated thanabs(x^2)
this would be the correct approach.
– Skillmon
6 hours ago
This would be much slower, though, and it is dependent on the sample size (in your output one can see kinks in the parabola for instance). For stuff more complicated than
abs(x^2)
this would be the correct approach.– Skillmon
6 hours ago
This would be much slower, though, and it is dependent on the sample size (in your output one can see kinks in the parabola for instance). For stuff more complicated than
abs(x^2)
this would be the correct approach.– Skillmon
6 hours ago
add a comment
|
This is really just for fun. You can make TikZ reflect the parabola (or anything you draw) at the x axis (say) automatically. This can be done by installing a nonlinear transformation, which is in this case particularly simple.
documentclass[tikz,border=3mm]standalone
usepgfmodulenonlineartransformations
makeatletter
defyreflect%
pgfmathsetmacromyyabs(pgf@y)%
pgf@y=myy pt
begindocument
begintikzpicture
beginscope[transform shape nonlinear=true]
pgftransformnonlinearyreflect
draw (-5,0)--(5,0);
draw (-4,6) parabola bend (0,-2) (4,6);
endscope
endtikzpicture
enddocument
As one can see, there are small gaps, so the solution is not as perfect as Skillmon's solution.
Please view the picture with 500/100, I feel parabol doesn't cut Ox axis.
– minhthien_2016
4 hours ago
@minhthien_2016 Yes, this is what is meant by "there are small gaps".
– Schrödinger's cat
4 hours ago
add a comment
|
This is really just for fun. You can make TikZ reflect the parabola (or anything you draw) at the x axis (say) automatically. This can be done by installing a nonlinear transformation, which is in this case particularly simple.
documentclass[tikz,border=3mm]standalone
usepgfmodulenonlineartransformations
makeatletter
defyreflect%
pgfmathsetmacromyyabs(pgf@y)%
pgf@y=myy pt
begindocument
begintikzpicture
beginscope[transform shape nonlinear=true]
pgftransformnonlinearyreflect
draw (-5,0)--(5,0);
draw (-4,6) parabola bend (0,-2) (4,6);
endscope
endtikzpicture
enddocument
As one can see, there are small gaps, so the solution is not as perfect as Skillmon's solution.
Please view the picture with 500/100, I feel parabol doesn't cut Ox axis.
– minhthien_2016
4 hours ago
@minhthien_2016 Yes, this is what is meant by "there are small gaps".
– Schrödinger's cat
4 hours ago
add a comment
|
This is really just for fun. You can make TikZ reflect the parabola (or anything you draw) at the x axis (say) automatically. This can be done by installing a nonlinear transformation, which is in this case particularly simple.
documentclass[tikz,border=3mm]standalone
usepgfmodulenonlineartransformations
makeatletter
defyreflect%
pgfmathsetmacromyyabs(pgf@y)%
pgf@y=myy pt
begindocument
begintikzpicture
beginscope[transform shape nonlinear=true]
pgftransformnonlinearyreflect
draw (-5,0)--(5,0);
draw (-4,6) parabola bend (0,-2) (4,6);
endscope
endtikzpicture
enddocument
As one can see, there are small gaps, so the solution is not as perfect as Skillmon's solution.
This is really just for fun. You can make TikZ reflect the parabola (or anything you draw) at the x axis (say) automatically. This can be done by installing a nonlinear transformation, which is in this case particularly simple.
documentclass[tikz,border=3mm]standalone
usepgfmodulenonlineartransformations
makeatletter
defyreflect%
pgfmathsetmacromyyabs(pgf@y)%
pgf@y=myy pt
begindocument
begintikzpicture
beginscope[transform shape nonlinear=true]
pgftransformnonlinearyreflect
draw (-5,0)--(5,0);
draw (-4,6) parabola bend (0,-2) (4,6);
endscope
endtikzpicture
enddocument
As one can see, there are small gaps, so the solution is not as perfect as Skillmon's solution.
answered 6 hours ago
Schrödinger's catSchrödinger's cat
7,60511 silver badges23 bronze badges
7,60511 silver badges23 bronze badges
Please view the picture with 500/100, I feel parabol doesn't cut Ox axis.
– minhthien_2016
4 hours ago
@minhthien_2016 Yes, this is what is meant by "there are small gaps".
– Schrödinger's cat
4 hours ago
add a comment
|
Please view the picture with 500/100, I feel parabol doesn't cut Ox axis.
– minhthien_2016
4 hours ago
@minhthien_2016 Yes, this is what is meant by "there are small gaps".
– Schrödinger's cat
4 hours ago
Please view the picture with 500/100, I feel parabol doesn't cut Ox axis.
– minhthien_2016
4 hours ago
Please view the picture with 500/100, I feel parabol doesn't cut Ox axis.
– minhthien_2016
4 hours ago
@minhthien_2016 Yes, this is what is meant by "there are small gaps".
– Schrödinger's cat
4 hours ago
@minhthien_2016 Yes, this is what is meant by "there are small gaps".
– Schrödinger's cat
4 hours ago
add a comment
|
DiaWaterBender 4u is a new contributor. Be nice, and check out our Code of Conduct.
DiaWaterBender 4u is a new contributor. Be nice, and check out our Code of Conduct.
DiaWaterBender 4u is a new contributor. Be nice, and check out our Code of Conduct.
DiaWaterBender 4u 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%2f508554%2fcant-make-parabola-without-including-the-tip%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