Can't make parabola without including the tipMacro to draw a parabola with pgf/TikZExample of matrix node in...

Why can't we use uninitialized local variable to access static content of its type?

Floating Point XOR

Is the name of an interval between two notes unique and absolute?

Inquiry answerer

How can I create folders in folders in terminal

How often is duct tape used during crewed space missions?

Whence comes increasing usage of "I'll do an X" instead of "I'll have" in ordering food?

Account creation and log-in system

Simple way to decompose a lists in a certain way?

What is the word for a person who destroys monuments?

Can one guy with a duplicator trigger a nuclear apocalypse?

All numbers in a 5x5 Minesweeper grid

Why are there two bearded faces wearing red hats on my stealth bomber icon?

What are the end bytes of *.docx file format

Should I inform my future product owner that there is a good chance that a team member will leave the company soon?

Strength of Female Chimpanzees vs. Male Chimpanzees?

Can Brexit be undone in an emergency?

Which block cipher parameters should be kept secret?

Why are two-stroke engines nearly unheard of in aviation?

Why are there no programmes / playbills for movies?

My passport was stamped with an exit stamp while transiting to another Schengen country via Turkey. Was this a mistake?

If people's daily habits are reliable then why is the stock market so unpredictable?

Why do we need to use transistors when building an OR gate?

How is underwater propagation of sound possible?



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







2















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.



taskbegin{tikzpicture}
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);
end{tikzpicture}


This is what it looks like










share|improve this question









New contributor



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




























    2















    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.



    taskbegin{tikzpicture}
    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);
    end{tikzpicture}


    This is what it looks like










    share|improve this question









    New contributor



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
























      2












      2








      2








      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.



      taskbegin{tikzpicture}
      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);
      end{tikzpicture}


      This is what it looks like










      share|improve this question









      New contributor



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











      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.



      taskbegin{tikzpicture}
      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);
      end{tikzpicture}


      This is what it looks like







      tikz-pgf






      share|improve this question









      New contributor



      DiaWaterBender 4u 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



      DiaWaterBender 4u 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







      DiaWaterBender 4u













      New contributor



      DiaWaterBender 4u 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









      DiaWaterBender 4uDiaWaterBender 4u

      112 bronze badges




      112 bronze badges




      New contributor



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




      New contributor




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



























          3 Answers
          3






          active

          oldest

          votes


















          3
















          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}

          begin{document}
          begin{tikzpicture}
          draw (-5,0)--(5,0);
          begin{scope}
          clip (-5,0) rectangle (5,6);
          draw (-4,6) parabola bend (0,-2) (4,6);
          draw (-4,-6) parabola bend (0,2) (4,-6);
          end{scope}
          end{tikzpicture}
          end{document}


          enter image description here






          share|improve this answer




























          • Approved always very simple solutions. Very good.

            – Sebastiano
            7 hours ago



















          2
















          Another simple solution is use the plot function and define parabola accordingly:



          documentclass[tikz,border=3mm]{standalone}

          begin{document}
          begin{tikzpicture}
          draw (-5,0)--(5,0);
          draw[semithick, red] plot [domain=-2:2] (2*x,{abs(x*x-1)});
          end{tikzpicture}
          end{document}


          enter image description here






          share|improve this answer


























          • 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





















          1
















          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}
          usepgfmodule{nonlineartransformations}
          makeatletter
          defyreflect{%
          pgfmathsetmacro{myy}{abs(pgf@y)}%
          pgf@y=myy pt}
          begin{document}
          begin{tikzpicture}
          begin{scope}[transform shape nonlinear=true]
          pgftransformnonlinear{yreflect}
          draw (-5,0)--(5,0);
          draw (-4,6) parabola bend (0,-2) (4,6);
          end{scope}
          end{tikzpicture}
          end{document}


          enter image description here



          As one can see, there are small gaps, so the solution is not as perfect as Skillmon's solution.






          share|improve this answer


























          • Please view the picture with 500/100, I feel parabol doesn't cut Ox axis.

            – minhthien_2016
            5 hours ago











          • @minhthien_2016 Yes, this is what is meant by "there are small gaps".

            – Schrödinger's cat
            5 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/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.










          draft saved

          draft discarded
















          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









          3
















          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}

          begin{document}
          begin{tikzpicture}
          draw (-5,0)--(5,0);
          begin{scope}
          clip (-5,0) rectangle (5,6);
          draw (-4,6) parabola bend (0,-2) (4,6);
          draw (-4,-6) parabola bend (0,2) (4,-6);
          end{scope}
          end{tikzpicture}
          end{document}


          enter image description here






          share|improve this answer




























          • Approved always very simple solutions. Very good.

            – Sebastiano
            7 hours ago
















          3
















          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}

          begin{document}
          begin{tikzpicture}
          draw (-5,0)--(5,0);
          begin{scope}
          clip (-5,0) rectangle (5,6);
          draw (-4,6) parabola bend (0,-2) (4,6);
          draw (-4,-6) parabola bend (0,2) (4,-6);
          end{scope}
          end{tikzpicture}
          end{document}


          enter image description here






          share|improve this answer




























          • Approved always very simple solutions. Very good.

            – Sebastiano
            7 hours ago














          3














          3










          3









          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}

          begin{document}
          begin{tikzpicture}
          draw (-5,0)--(5,0);
          begin{scope}
          clip (-5,0) rectangle (5,6);
          draw (-4,6) parabola bend (0,-2) (4,6);
          draw (-4,-6) parabola bend (0,2) (4,-6);
          end{scope}
          end{tikzpicture}
          end{document}


          enter image description here






          share|improve this answer















          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}

          begin{document}
          begin{tikzpicture}
          draw (-5,0)--(5,0);
          begin{scope}
          clip (-5,0) rectangle (5,6);
          draw (-4,6) parabola bend (0,-2) (4,6);
          draw (-4,-6) parabola bend (0,2) (4,-6);
          end{scope}
          end{tikzpicture}
          end{document}


          enter image description here







          share|improve this answer














          share|improve this answer



          share|improve this answer








          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



















          • 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













          2
















          Another simple solution is use the plot function and define parabola accordingly:



          documentclass[tikz,border=3mm]{standalone}

          begin{document}
          begin{tikzpicture}
          draw (-5,0)--(5,0);
          draw[semithick, red] plot [domain=-2:2] (2*x,{abs(x*x-1)});
          end{tikzpicture}
          end{document}


          enter image description here






          share|improve this answer


























          • 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


















          2
















          Another simple solution is use the plot function and define parabola accordingly:



          documentclass[tikz,border=3mm]{standalone}

          begin{document}
          begin{tikzpicture}
          draw (-5,0)--(5,0);
          draw[semithick, red] plot [domain=-2:2] (2*x,{abs(x*x-1)});
          end{tikzpicture}
          end{document}


          enter image description here






          share|improve this answer


























          • 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
















          2














          2










          2









          Another simple solution is use the plot function and define parabola accordingly:



          documentclass[tikz,border=3mm]{standalone}

          begin{document}
          begin{tikzpicture}
          draw (-5,0)--(5,0);
          draw[semithick, red] plot [domain=-2:2] (2*x,{abs(x*x-1)});
          end{tikzpicture}
          end{document}


          enter image description here






          share|improve this answer













          Another simple solution is use the plot function and define parabola accordingly:



          documentclass[tikz,border=3mm]{standalone}

          begin{document}
          begin{tikzpicture}
          draw (-5,0)--(5,0);
          draw[semithick, red] plot [domain=-2:2] (2*x,{abs(x*x-1)});
          end{tikzpicture}
          end{document}


          enter image description here







          share|improve this answer












          share|improve this answer



          share|improve this answer










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



















          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













          1
















          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}
          usepgfmodule{nonlineartransformations}
          makeatletter
          defyreflect{%
          pgfmathsetmacro{myy}{abs(pgf@y)}%
          pgf@y=myy pt}
          begin{document}
          begin{tikzpicture}
          begin{scope}[transform shape nonlinear=true]
          pgftransformnonlinear{yreflect}
          draw (-5,0)--(5,0);
          draw (-4,6) parabola bend (0,-2) (4,6);
          end{scope}
          end{tikzpicture}
          end{document}


          enter image description here



          As one can see, there are small gaps, so the solution is not as perfect as Skillmon's solution.






          share|improve this answer


























          • Please view the picture with 500/100, I feel parabol doesn't cut Ox axis.

            – minhthien_2016
            5 hours ago











          • @minhthien_2016 Yes, this is what is meant by "there are small gaps".

            – Schrödinger's cat
            5 hours ago
















          1
















          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}
          usepgfmodule{nonlineartransformations}
          makeatletter
          defyreflect{%
          pgfmathsetmacro{myy}{abs(pgf@y)}%
          pgf@y=myy pt}
          begin{document}
          begin{tikzpicture}
          begin{scope}[transform shape nonlinear=true]
          pgftransformnonlinear{yreflect}
          draw (-5,0)--(5,0);
          draw (-4,6) parabola bend (0,-2) (4,6);
          end{scope}
          end{tikzpicture}
          end{document}


          enter image description here



          As one can see, there are small gaps, so the solution is not as perfect as Skillmon's solution.






          share|improve this answer


























          • Please view the picture with 500/100, I feel parabol doesn't cut Ox axis.

            – minhthien_2016
            5 hours ago











          • @minhthien_2016 Yes, this is what is meant by "there are small gaps".

            – Schrödinger's cat
            5 hours ago














          1














          1










          1









          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}
          usepgfmodule{nonlineartransformations}
          makeatletter
          defyreflect{%
          pgfmathsetmacro{myy}{abs(pgf@y)}%
          pgf@y=myy pt}
          begin{document}
          begin{tikzpicture}
          begin{scope}[transform shape nonlinear=true]
          pgftransformnonlinear{yreflect}
          draw (-5,0)--(5,0);
          draw (-4,6) parabola bend (0,-2) (4,6);
          end{scope}
          end{tikzpicture}
          end{document}


          enter image description here



          As one can see, there are small gaps, so the solution is not as perfect as Skillmon's solution.






          share|improve this answer













          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}
          usepgfmodule{nonlineartransformations}
          makeatletter
          defyreflect{%
          pgfmathsetmacro{myy}{abs(pgf@y)}%
          pgf@y=myy pt}
          begin{document}
          begin{tikzpicture}
          begin{scope}[transform shape nonlinear=true]
          pgftransformnonlinear{yreflect}
          draw (-5,0)--(5,0);
          draw (-4,6) parabola bend (0,-2) (4,6);
          end{scope}
          end{tikzpicture}
          end{document}


          enter image description here



          As one can see, there are small gaps, so the solution is not as perfect as Skillmon's solution.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 6 hours ago









          Schrödinger's catSchrödinger's cat

          7,61511 silver badges23 bronze badges




          7,61511 silver badges23 bronze badges
















          • Please view the picture with 500/100, I feel parabol doesn't cut Ox axis.

            – minhthien_2016
            5 hours ago











          • @minhthien_2016 Yes, this is what is meant by "there are small gaps".

            – Schrödinger's cat
            5 hours ago



















          • Please view the picture with 500/100, I feel parabol doesn't cut Ox axis.

            – minhthien_2016
            5 hours ago











          • @minhthien_2016 Yes, this is what is meant by "there are small gaps".

            – Schrödinger's cat
            5 hours ago

















          Please view the picture with 500/100, I feel parabol doesn't cut Ox axis.

          – minhthien_2016
          5 hours ago





          Please view the picture with 500/100, I feel parabol doesn't cut Ox axis.

          – minhthien_2016
          5 hours ago













          @minhthien_2016 Yes, this is what is meant by "there are small gaps".

          – Schrödinger's cat
          5 hours ago





          @minhthien_2016 Yes, this is what is meant by "there are small gaps".

          – Schrödinger's cat
          5 hours ago











          DiaWaterBender 4u is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded

















          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.




          draft saved


          draft discarded














          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





















































          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

          Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

          Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

          Nicolae Petrescu-Găină Cuprins Biografie | Opera | In memoriam | Varia | Controverse, incertitudini...