appearance of regression line

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
4
down vote

favorite
1












Can anyone explain the uneven appearance of the regression line in this plot?



documentclass[border=0.5cm]standalone
usepackagepgfplots
pgfplotssetcompat=1.16
usepackagepgfplotstable
pgfplotstableread[col sep=comma]
a,b
5,14
4,13
6,11
8,12
8,10
5,9
3,12
data
begindocument
begintikzpicture
beginaxis
addplot [only marks] table [x=a, y=b] data;
addplot [dashdotted] table [x=a, y=create col/linear regression=y=b] data;
endaxis
endtikzpicture
enddocument


enter image description hereenter image description here










share|improve this question

























    up vote
    4
    down vote

    favorite
    1












    Can anyone explain the uneven appearance of the regression line in this plot?



    documentclass[border=0.5cm]standalone
    usepackagepgfplots
    pgfplotssetcompat=1.16
    usepackagepgfplotstable
    pgfplotstableread[col sep=comma]
    a,b
    5,14
    4,13
    6,11
    8,12
    8,10
    5,9
    3,12
    data
    begindocument
    begintikzpicture
    beginaxis
    addplot [only marks] table [x=a, y=b] data;
    addplot [dashdotted] table [x=a, y=create col/linear regression=y=b] data;
    endaxis
    endtikzpicture
    enddocument


    enter image description hereenter image description here










    share|improve this question























      up vote
      4
      down vote

      favorite
      1









      up vote
      4
      down vote

      favorite
      1






      1





      Can anyone explain the uneven appearance of the regression line in this plot?



      documentclass[border=0.5cm]standalone
      usepackagepgfplots
      pgfplotssetcompat=1.16
      usepackagepgfplotstable
      pgfplotstableread[col sep=comma]
      a,b
      5,14
      4,13
      6,11
      8,12
      8,10
      5,9
      3,12
      data
      begindocument
      begintikzpicture
      beginaxis
      addplot [only marks] table [x=a, y=b] data;
      addplot [dashdotted] table [x=a, y=create col/linear regression=y=b] data;
      endaxis
      endtikzpicture
      enddocument


      enter image description hereenter image description here










      share|improve this question













      Can anyone explain the uneven appearance of the regression line in this plot?



      documentclass[border=0.5cm]standalone
      usepackagepgfplots
      pgfplotssetcompat=1.16
      usepackagepgfplotstable
      pgfplotstableread[col sep=comma]
      a,b
      5,14
      4,13
      6,11
      8,12
      8,10
      5,9
      3,12
      data
      begindocument
      begintikzpicture
      beginaxis
      addplot [only marks] table [x=a, y=b] data;
      addplot [dashdotted] table [x=a, y=create col/linear regression=y=b] data;
      endaxis
      endtikzpicture
      enddocument


      enter image description hereenter image description here







      pgfplots






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 1 hour ago









      Gareth Walker

      66028




      66028




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          3
          down vote



          accepted










          Pgfplots decomposes the regression line into small overlapping segments. Luckily it computes the parameters of the regression line and stores them into pgfplotstableregressionb and pgfplotstableregressiona, which allows one to draw the regression line as an ordinary single-stroke plot.



          documentclass[border=0.5cm]standalone
          usepackagepgfplots
          pgfplotssetcompat=1.16
          usepackagepgfplotstable
          pgfplotstableread[col sep=comma]
          a,b
          5,14
          4,13
          6,11
          8,12
          8,10
          5,9
          3,12
          data
          begindocument
          begintikzpicture
          beginaxis
          addplot [only marks] table [x=a, y=b] data;
          addplot [draw=none] table [x=a,
          y=create col/linear regression=y=b] data;
          addplot[dashdotted,domain=3:8] pgfplotstableregressionb+pgfplotstableregressiona*x;
          endaxis
          endtikzpicture
          enddocument


          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',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            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%2f456707%2fappearance-of-regression-line%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            3
            down vote



            accepted










            Pgfplots decomposes the regression line into small overlapping segments. Luckily it computes the parameters of the regression line and stores them into pgfplotstableregressionb and pgfplotstableregressiona, which allows one to draw the regression line as an ordinary single-stroke plot.



            documentclass[border=0.5cm]standalone
            usepackagepgfplots
            pgfplotssetcompat=1.16
            usepackagepgfplotstable
            pgfplotstableread[col sep=comma]
            a,b
            5,14
            4,13
            6,11
            8,12
            8,10
            5,9
            3,12
            data
            begindocument
            begintikzpicture
            beginaxis
            addplot [only marks] table [x=a, y=b] data;
            addplot [draw=none] table [x=a,
            y=create col/linear regression=y=b] data;
            addplot[dashdotted,domain=3:8] pgfplotstableregressionb+pgfplotstableregressiona*x;
            endaxis
            endtikzpicture
            enddocument


            enter image description here






            share|improve this answer
























              up vote
              3
              down vote



              accepted










              Pgfplots decomposes the regression line into small overlapping segments. Luckily it computes the parameters of the regression line and stores them into pgfplotstableregressionb and pgfplotstableregressiona, which allows one to draw the regression line as an ordinary single-stroke plot.



              documentclass[border=0.5cm]standalone
              usepackagepgfplots
              pgfplotssetcompat=1.16
              usepackagepgfplotstable
              pgfplotstableread[col sep=comma]
              a,b
              5,14
              4,13
              6,11
              8,12
              8,10
              5,9
              3,12
              data
              begindocument
              begintikzpicture
              beginaxis
              addplot [only marks] table [x=a, y=b] data;
              addplot [draw=none] table [x=a,
              y=create col/linear regression=y=b] data;
              addplot[dashdotted,domain=3:8] pgfplotstableregressionb+pgfplotstableregressiona*x;
              endaxis
              endtikzpicture
              enddocument


              enter image description here






              share|improve this answer






















                up vote
                3
                down vote



                accepted







                up vote
                3
                down vote



                accepted






                Pgfplots decomposes the regression line into small overlapping segments. Luckily it computes the parameters of the regression line and stores them into pgfplotstableregressionb and pgfplotstableregressiona, which allows one to draw the regression line as an ordinary single-stroke plot.



                documentclass[border=0.5cm]standalone
                usepackagepgfplots
                pgfplotssetcompat=1.16
                usepackagepgfplotstable
                pgfplotstableread[col sep=comma]
                a,b
                5,14
                4,13
                6,11
                8,12
                8,10
                5,9
                3,12
                data
                begindocument
                begintikzpicture
                beginaxis
                addplot [only marks] table [x=a, y=b] data;
                addplot [draw=none] table [x=a,
                y=create col/linear regression=y=b] data;
                addplot[dashdotted,domain=3:8] pgfplotstableregressionb+pgfplotstableregressiona*x;
                endaxis
                endtikzpicture
                enddocument


                enter image description here






                share|improve this answer












                Pgfplots decomposes the regression line into small overlapping segments. Luckily it computes the parameters of the regression line and stores them into pgfplotstableregressionb and pgfplotstableregressiona, which allows one to draw the regression line as an ordinary single-stroke plot.



                documentclass[border=0.5cm]standalone
                usepackagepgfplots
                pgfplotssetcompat=1.16
                usepackagepgfplotstable
                pgfplotstableread[col sep=comma]
                a,b
                5,14
                4,13
                6,11
                8,12
                8,10
                5,9
                3,12
                data
                begindocument
                begintikzpicture
                beginaxis
                addplot [only marks] table [x=a, y=b] data;
                addplot [draw=none] table [x=a,
                y=create col/linear regression=y=b] data;
                addplot[dashdotted,domain=3:8] pgfplotstableregressionb+pgfplotstableregressiona*x;
                endaxis
                endtikzpicture
                enddocument


                enter image description here







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 34 mins ago









                marmot

                68.4k475147




                68.4k475147



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f456707%2fappearance-of-regression-line%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Comments

                    Popular posts from this blog

                    What does second last employer means? [closed]

                    List of Gilmore Girls characters

                    One-line joke