Plotting point on a graph












1















I would like to draw the curve shown below including the marked points and the name of the curve.



enter image description here



Using the code



begin{center}
begin{tikzpicture}[scale=0.8,domain=-2:20]
begin{axis}[
height = 11.7cm,
width = 15cm,
axis lines=middle,
grid=major,
xmin=-2,
xmax=10,
ymin=-2,
ymax=20,
y label style={at={(axis description cs:0.5,-0.05)},anchor=north},
x label style={at={(axis description cs:-0.05,.5)},rotate=0,anchor=south},
xlabel=$y$,
ylabel=$x$,
xtick={-2,-1,0,...,14},
ytick={-2,0,...,20},
tick style={very thick},
legend style={
at={(rel axis cs:0,1)},
anchor=north west,draw=none,inner sep=0pt,fill=gray!10}
]
addplot[black,thick,samples=1] {0};
draw[color=red, smooth] plot (x,x*x-8*x+16) node[above left] {$y =x^2-8x+16$};
end{axis}
end{tikzpicture}
end{center}


We can create the graph but unable to mark the points.
enter image description here










share|improve this question





























    1















    I would like to draw the curve shown below including the marked points and the name of the curve.



    enter image description here



    Using the code



    begin{center}
    begin{tikzpicture}[scale=0.8,domain=-2:20]
    begin{axis}[
    height = 11.7cm,
    width = 15cm,
    axis lines=middle,
    grid=major,
    xmin=-2,
    xmax=10,
    ymin=-2,
    ymax=20,
    y label style={at={(axis description cs:0.5,-0.05)},anchor=north},
    x label style={at={(axis description cs:-0.05,.5)},rotate=0,anchor=south},
    xlabel=$y$,
    ylabel=$x$,
    xtick={-2,-1,0,...,14},
    ytick={-2,0,...,20},
    tick style={very thick},
    legend style={
    at={(rel axis cs:0,1)},
    anchor=north west,draw=none,inner sep=0pt,fill=gray!10}
    ]
    addplot[black,thick,samples=1] {0};
    draw[color=red, smooth] plot (x,x*x-8*x+16) node[above left] {$y =x^2-8x+16$};
    end{axis}
    end{tikzpicture}
    end{center}


    We can create the graph but unable to mark the points.
    enter image description here










    share|improve this question



























      1












      1








      1


      0






      I would like to draw the curve shown below including the marked points and the name of the curve.



      enter image description here



      Using the code



      begin{center}
      begin{tikzpicture}[scale=0.8,domain=-2:20]
      begin{axis}[
      height = 11.7cm,
      width = 15cm,
      axis lines=middle,
      grid=major,
      xmin=-2,
      xmax=10,
      ymin=-2,
      ymax=20,
      y label style={at={(axis description cs:0.5,-0.05)},anchor=north},
      x label style={at={(axis description cs:-0.05,.5)},rotate=0,anchor=south},
      xlabel=$y$,
      ylabel=$x$,
      xtick={-2,-1,0,...,14},
      ytick={-2,0,...,20},
      tick style={very thick},
      legend style={
      at={(rel axis cs:0,1)},
      anchor=north west,draw=none,inner sep=0pt,fill=gray!10}
      ]
      addplot[black,thick,samples=1] {0};
      draw[color=red, smooth] plot (x,x*x-8*x+16) node[above left] {$y =x^2-8x+16$};
      end{axis}
      end{tikzpicture}
      end{center}


      We can create the graph but unable to mark the points.
      enter image description here










      share|improve this question
















      I would like to draw the curve shown below including the marked points and the name of the curve.



      enter image description here



      Using the code



      begin{center}
      begin{tikzpicture}[scale=0.8,domain=-2:20]
      begin{axis}[
      height = 11.7cm,
      width = 15cm,
      axis lines=middle,
      grid=major,
      xmin=-2,
      xmax=10,
      ymin=-2,
      ymax=20,
      y label style={at={(axis description cs:0.5,-0.05)},anchor=north},
      x label style={at={(axis description cs:-0.05,.5)},rotate=0,anchor=south},
      xlabel=$y$,
      ylabel=$x$,
      xtick={-2,-1,0,...,14},
      ytick={-2,0,...,20},
      tick style={very thick},
      legend style={
      at={(rel axis cs:0,1)},
      anchor=north west,draw=none,inner sep=0pt,fill=gray!10}
      ]
      addplot[black,thick,samples=1] {0};
      draw[color=red, smooth] plot (x,x*x-8*x+16) node[above left] {$y =x^2-8x+16$};
      end{axis}
      end{tikzpicture}
      end{center}


      We can create the graph but unable to mark the points.
      enter image description here







      tikz-pgf pgfplots graphs tikz-3dplot






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 4 hours ago







      Jettie Baker

















      asked 9 hours ago









      Jettie BakerJettie Baker

      515




      515






















          1 Answer
          1






          active

          oldest

          votes


















          5














          This is based on your own answer with some modifications:




          1. Use addplot instead of the TikZy draw plot.

          2. Put scale to the options of the axis (since that may be relevant once you start filling some areas).

          3. Added coordinates with labels.


          Result:



          documentclass[tikz,border=3.14mm]{standalone}
          usetikzlibrary{shadows.blur}
          usepackage{pgfplots}
          pgfplotsset{compat=1.16}
          begin{document}
          begin{tikzpicture}[fancy label/.style={fill=white,rounded corners=1pt,blur
          shadow}]
          begin{axis}[scale=0.8,
          height = 11.7cm,
          width = 15cm,
          axis lines=middle,
          grid=major,
          xmin=-2,
          xmax=10,
          ymin=-2,
          ymax=20,
          y label style={at={(axis description cs:0.5,-0.05)},anchor=north},
          x label style={at={(axis description cs:-0.05,.5)},rotate=0,anchor=south},
          xlabel=$y$,
          ylabel=$x$,
          xtick={-2,-1,0,...,14},
          ytick={-2,0,...,20},
          tick style={very thick},
          legend style={
          at={(rel axis cs:0,1)},
          anchor=north west,draw=none,inner sep=0pt,fill=gray!10}
          ]
          addplot[domain=-2:20,red,thick,smooth] {x*x-8*x+16} node[above left] {$y =x^2-8x+16$};
          node[fill,circle,inner sep=1.5pt,label={[fancy label]right:$(0,16)$}] at
          (0,16){};
          node[fill,circle,inner sep=1.5pt,label={[fancy label]below left:$(4,0)$}] at
          (4,0){};
          end{axis}
          end{tikzpicture}
          end{document}


          enter image description here






          share|improve this answer























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


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f481764%2fplotting-point-on-a-graph%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            5














            This is based on your own answer with some modifications:




            1. Use addplot instead of the TikZy draw plot.

            2. Put scale to the options of the axis (since that may be relevant once you start filling some areas).

            3. Added coordinates with labels.


            Result:



            documentclass[tikz,border=3.14mm]{standalone}
            usetikzlibrary{shadows.blur}
            usepackage{pgfplots}
            pgfplotsset{compat=1.16}
            begin{document}
            begin{tikzpicture}[fancy label/.style={fill=white,rounded corners=1pt,blur
            shadow}]
            begin{axis}[scale=0.8,
            height = 11.7cm,
            width = 15cm,
            axis lines=middle,
            grid=major,
            xmin=-2,
            xmax=10,
            ymin=-2,
            ymax=20,
            y label style={at={(axis description cs:0.5,-0.05)},anchor=north},
            x label style={at={(axis description cs:-0.05,.5)},rotate=0,anchor=south},
            xlabel=$y$,
            ylabel=$x$,
            xtick={-2,-1,0,...,14},
            ytick={-2,0,...,20},
            tick style={very thick},
            legend style={
            at={(rel axis cs:0,1)},
            anchor=north west,draw=none,inner sep=0pt,fill=gray!10}
            ]
            addplot[domain=-2:20,red,thick,smooth] {x*x-8*x+16} node[above left] {$y =x^2-8x+16$};
            node[fill,circle,inner sep=1.5pt,label={[fancy label]right:$(0,16)$}] at
            (0,16){};
            node[fill,circle,inner sep=1.5pt,label={[fancy label]below left:$(4,0)$}] at
            (4,0){};
            end{axis}
            end{tikzpicture}
            end{document}


            enter image description here






            share|improve this answer




























              5














              This is based on your own answer with some modifications:




              1. Use addplot instead of the TikZy draw plot.

              2. Put scale to the options of the axis (since that may be relevant once you start filling some areas).

              3. Added coordinates with labels.


              Result:



              documentclass[tikz,border=3.14mm]{standalone}
              usetikzlibrary{shadows.blur}
              usepackage{pgfplots}
              pgfplotsset{compat=1.16}
              begin{document}
              begin{tikzpicture}[fancy label/.style={fill=white,rounded corners=1pt,blur
              shadow}]
              begin{axis}[scale=0.8,
              height = 11.7cm,
              width = 15cm,
              axis lines=middle,
              grid=major,
              xmin=-2,
              xmax=10,
              ymin=-2,
              ymax=20,
              y label style={at={(axis description cs:0.5,-0.05)},anchor=north},
              x label style={at={(axis description cs:-0.05,.5)},rotate=0,anchor=south},
              xlabel=$y$,
              ylabel=$x$,
              xtick={-2,-1,0,...,14},
              ytick={-2,0,...,20},
              tick style={very thick},
              legend style={
              at={(rel axis cs:0,1)},
              anchor=north west,draw=none,inner sep=0pt,fill=gray!10}
              ]
              addplot[domain=-2:20,red,thick,smooth] {x*x-8*x+16} node[above left] {$y =x^2-8x+16$};
              node[fill,circle,inner sep=1.5pt,label={[fancy label]right:$(0,16)$}] at
              (0,16){};
              node[fill,circle,inner sep=1.5pt,label={[fancy label]below left:$(4,0)$}] at
              (4,0){};
              end{axis}
              end{tikzpicture}
              end{document}


              enter image description here






              share|improve this answer


























                5












                5








                5







                This is based on your own answer with some modifications:




                1. Use addplot instead of the TikZy draw plot.

                2. Put scale to the options of the axis (since that may be relevant once you start filling some areas).

                3. Added coordinates with labels.


                Result:



                documentclass[tikz,border=3.14mm]{standalone}
                usetikzlibrary{shadows.blur}
                usepackage{pgfplots}
                pgfplotsset{compat=1.16}
                begin{document}
                begin{tikzpicture}[fancy label/.style={fill=white,rounded corners=1pt,blur
                shadow}]
                begin{axis}[scale=0.8,
                height = 11.7cm,
                width = 15cm,
                axis lines=middle,
                grid=major,
                xmin=-2,
                xmax=10,
                ymin=-2,
                ymax=20,
                y label style={at={(axis description cs:0.5,-0.05)},anchor=north},
                x label style={at={(axis description cs:-0.05,.5)},rotate=0,anchor=south},
                xlabel=$y$,
                ylabel=$x$,
                xtick={-2,-1,0,...,14},
                ytick={-2,0,...,20},
                tick style={very thick},
                legend style={
                at={(rel axis cs:0,1)},
                anchor=north west,draw=none,inner sep=0pt,fill=gray!10}
                ]
                addplot[domain=-2:20,red,thick,smooth] {x*x-8*x+16} node[above left] {$y =x^2-8x+16$};
                node[fill,circle,inner sep=1.5pt,label={[fancy label]right:$(0,16)$}] at
                (0,16){};
                node[fill,circle,inner sep=1.5pt,label={[fancy label]below left:$(4,0)$}] at
                (4,0){};
                end{axis}
                end{tikzpicture}
                end{document}


                enter image description here






                share|improve this answer













                This is based on your own answer with some modifications:




                1. Use addplot instead of the TikZy draw plot.

                2. Put scale to the options of the axis (since that may be relevant once you start filling some areas).

                3. Added coordinates with labels.


                Result:



                documentclass[tikz,border=3.14mm]{standalone}
                usetikzlibrary{shadows.blur}
                usepackage{pgfplots}
                pgfplotsset{compat=1.16}
                begin{document}
                begin{tikzpicture}[fancy label/.style={fill=white,rounded corners=1pt,blur
                shadow}]
                begin{axis}[scale=0.8,
                height = 11.7cm,
                width = 15cm,
                axis lines=middle,
                grid=major,
                xmin=-2,
                xmax=10,
                ymin=-2,
                ymax=20,
                y label style={at={(axis description cs:0.5,-0.05)},anchor=north},
                x label style={at={(axis description cs:-0.05,.5)},rotate=0,anchor=south},
                xlabel=$y$,
                ylabel=$x$,
                xtick={-2,-1,0,...,14},
                ytick={-2,0,...,20},
                tick style={very thick},
                legend style={
                at={(rel axis cs:0,1)},
                anchor=north west,draw=none,inner sep=0pt,fill=gray!10}
                ]
                addplot[domain=-2:20,red,thick,smooth] {x*x-8*x+16} node[above left] {$y =x^2-8x+16$};
                node[fill,circle,inner sep=1.5pt,label={[fancy label]right:$(0,16)$}] at
                (0,16){};
                node[fill,circle,inner sep=1.5pt,label={[fancy label]below left:$(4,0)$}] at
                (4,0){};
                end{axis}
                end{tikzpicture}
                end{document}


                enter image description here







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 7 hours ago









                marmotmarmot

                112k5142268




                112k5142268






























                    draft saved

                    draft discarded




















































                    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%2f481764%2fplotting-point-on-a-graph%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

                    Contact image not getting when fetch all contact list from iPhone by CNContact

                    count number of partitions of a set with n elements into k subsets

                    A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks