Draw an array of lines and vectors in tikz












5














How do we draw a figure like this in tikz?



enter image description here



I am able to draw the x-y frame via:



begin{tikzpicture}
draw[->] (0,0,0)--(1,0,0) node[right]{$x$};
draw[->] (0,0,0)--(0,1,0) node[above]{$y$};
end{tikzpicture}


other than that, it is a bit challenging to me.



Thank you in advance!










share|improve this question



























    5














    How do we draw a figure like this in tikz?



    enter image description here



    I am able to draw the x-y frame via:



    begin{tikzpicture}
    draw[->] (0,0,0)--(1,0,0) node[right]{$x$};
    draw[->] (0,0,0)--(0,1,0) node[above]{$y$};
    end{tikzpicture}


    other than that, it is a bit challenging to me.



    Thank you in advance!










    share|improve this question

























      5












      5








      5


      1





      How do we draw a figure like this in tikz?



      enter image description here



      I am able to draw the x-y frame via:



      begin{tikzpicture}
      draw[->] (0,0,0)--(1,0,0) node[right]{$x$};
      draw[->] (0,0,0)--(0,1,0) node[above]{$y$};
      end{tikzpicture}


      other than that, it is a bit challenging to me.



      Thank you in advance!










      share|improve this question













      How do we draw a figure like this in tikz?



      enter image description here



      I am able to draw the x-y frame via:



      begin{tikzpicture}
      draw[->] (0,0,0)--(1,0,0) node[right]{$x$};
      draw[->] (0,0,0)--(0,1,0) node[above]{$y$};
      end{tikzpicture}


      other than that, it is a bit challenging to me.



      Thank you in advance!







      tikz-pgf tikz-styles tikz-arrows technical-drawing draw






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Dec 17 at 15:05









      annie heart

      31017




      31017






















          1 Answer
          1






          active

          oldest

          votes


















          6














          I think this should work



          documentclass[12pt, border = 5pt]{standalone}

          usepackage{tikz}

          begin{document}

          begin{tikzpicture}
          foreach x in {0, ..., 4} {
          draw[thick, red] (x, 0) -- (x, 2);
          fill[black] (x, 0) circle (0.1);
          fill[black] (x, 2) circle (0.1);
          draw[blue, thick, ->] (x, 0) ++(135 : 0.3) -- ++(-45 : 0.6);
          draw[blue, thick, ->] (x, 2) ++(-45 : 0.3) -- ++(135 : 0.6);
          }
          begin{scope}[yshift = 2.5cm]
          draw[brown, ->] (0, 0) -- (1, 0) node[right]{$x$};
          draw[brown, ->] (0, 0) -- (0, 1) node[above]{$y$};
          end{scope}

          end{tikzpicture}

          end{document}


          enter image description here






          share|improve this answer



















          • 1




            thank you fantastic!
            – annie heart
            Dec 17 at 15:16






          • 1




            @Sebastiano You're right, looks much nicer. Thanks for the suggestion :)
            – caverac
            Dec 17 at 16:47










          • could you remind me what has been changed?
            – annie heart
            Dec 17 at 19:20










          • @annieheart just changed the ordering of dots vs red lines
            – caverac
            Dec 17 at 19:21











          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%2f466221%2fdraw-an-array-of-lines-and-vectors-in-tikz%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









          6














          I think this should work



          documentclass[12pt, border = 5pt]{standalone}

          usepackage{tikz}

          begin{document}

          begin{tikzpicture}
          foreach x in {0, ..., 4} {
          draw[thick, red] (x, 0) -- (x, 2);
          fill[black] (x, 0) circle (0.1);
          fill[black] (x, 2) circle (0.1);
          draw[blue, thick, ->] (x, 0) ++(135 : 0.3) -- ++(-45 : 0.6);
          draw[blue, thick, ->] (x, 2) ++(-45 : 0.3) -- ++(135 : 0.6);
          }
          begin{scope}[yshift = 2.5cm]
          draw[brown, ->] (0, 0) -- (1, 0) node[right]{$x$};
          draw[brown, ->] (0, 0) -- (0, 1) node[above]{$y$};
          end{scope}

          end{tikzpicture}

          end{document}


          enter image description here






          share|improve this answer



















          • 1




            thank you fantastic!
            – annie heart
            Dec 17 at 15:16






          • 1




            @Sebastiano You're right, looks much nicer. Thanks for the suggestion :)
            – caverac
            Dec 17 at 16:47










          • could you remind me what has been changed?
            – annie heart
            Dec 17 at 19:20










          • @annieheart just changed the ordering of dots vs red lines
            – caverac
            Dec 17 at 19:21
















          6














          I think this should work



          documentclass[12pt, border = 5pt]{standalone}

          usepackage{tikz}

          begin{document}

          begin{tikzpicture}
          foreach x in {0, ..., 4} {
          draw[thick, red] (x, 0) -- (x, 2);
          fill[black] (x, 0) circle (0.1);
          fill[black] (x, 2) circle (0.1);
          draw[blue, thick, ->] (x, 0) ++(135 : 0.3) -- ++(-45 : 0.6);
          draw[blue, thick, ->] (x, 2) ++(-45 : 0.3) -- ++(135 : 0.6);
          }
          begin{scope}[yshift = 2.5cm]
          draw[brown, ->] (0, 0) -- (1, 0) node[right]{$x$};
          draw[brown, ->] (0, 0) -- (0, 1) node[above]{$y$};
          end{scope}

          end{tikzpicture}

          end{document}


          enter image description here






          share|improve this answer



















          • 1




            thank you fantastic!
            – annie heart
            Dec 17 at 15:16






          • 1




            @Sebastiano You're right, looks much nicer. Thanks for the suggestion :)
            – caverac
            Dec 17 at 16:47










          • could you remind me what has been changed?
            – annie heart
            Dec 17 at 19:20










          • @annieheart just changed the ordering of dots vs red lines
            – caverac
            Dec 17 at 19:21














          6












          6








          6






          I think this should work



          documentclass[12pt, border = 5pt]{standalone}

          usepackage{tikz}

          begin{document}

          begin{tikzpicture}
          foreach x in {0, ..., 4} {
          draw[thick, red] (x, 0) -- (x, 2);
          fill[black] (x, 0) circle (0.1);
          fill[black] (x, 2) circle (0.1);
          draw[blue, thick, ->] (x, 0) ++(135 : 0.3) -- ++(-45 : 0.6);
          draw[blue, thick, ->] (x, 2) ++(-45 : 0.3) -- ++(135 : 0.6);
          }
          begin{scope}[yshift = 2.5cm]
          draw[brown, ->] (0, 0) -- (1, 0) node[right]{$x$};
          draw[brown, ->] (0, 0) -- (0, 1) node[above]{$y$};
          end{scope}

          end{tikzpicture}

          end{document}


          enter image description here






          share|improve this answer














          I think this should work



          documentclass[12pt, border = 5pt]{standalone}

          usepackage{tikz}

          begin{document}

          begin{tikzpicture}
          foreach x in {0, ..., 4} {
          draw[thick, red] (x, 0) -- (x, 2);
          fill[black] (x, 0) circle (0.1);
          fill[black] (x, 2) circle (0.1);
          draw[blue, thick, ->] (x, 0) ++(135 : 0.3) -- ++(-45 : 0.6);
          draw[blue, thick, ->] (x, 2) ++(-45 : 0.3) -- ++(135 : 0.6);
          }
          begin{scope}[yshift = 2.5cm]
          draw[brown, ->] (0, 0) -- (1, 0) node[right]{$x$};
          draw[brown, ->] (0, 0) -- (0, 1) node[above]{$y$};
          end{scope}

          end{tikzpicture}

          end{document}


          enter image description here







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Dec 17 at 16:47

























          answered Dec 17 at 15:15









          caverac

          5,3731522




          5,3731522








          • 1




            thank you fantastic!
            – annie heart
            Dec 17 at 15:16






          • 1




            @Sebastiano You're right, looks much nicer. Thanks for the suggestion :)
            – caverac
            Dec 17 at 16:47










          • could you remind me what has been changed?
            – annie heart
            Dec 17 at 19:20










          • @annieheart just changed the ordering of dots vs red lines
            – caverac
            Dec 17 at 19:21














          • 1




            thank you fantastic!
            – annie heart
            Dec 17 at 15:16






          • 1




            @Sebastiano You're right, looks much nicer. Thanks for the suggestion :)
            – caverac
            Dec 17 at 16:47










          • could you remind me what has been changed?
            – annie heart
            Dec 17 at 19:20










          • @annieheart just changed the ordering of dots vs red lines
            – caverac
            Dec 17 at 19:21








          1




          1




          thank you fantastic!
          – annie heart
          Dec 17 at 15:16




          thank you fantastic!
          – annie heart
          Dec 17 at 15:16




          1




          1




          @Sebastiano You're right, looks much nicer. Thanks for the suggestion :)
          – caverac
          Dec 17 at 16:47




          @Sebastiano You're right, looks much nicer. Thanks for the suggestion :)
          – caverac
          Dec 17 at 16:47












          could you remind me what has been changed?
          – annie heart
          Dec 17 at 19:20




          could you remind me what has been changed?
          – annie heart
          Dec 17 at 19:20












          @annieheart just changed the ordering of dots vs red lines
          – caverac
          Dec 17 at 19:21




          @annieheart just changed the ordering of dots vs red lines
          – caverac
          Dec 17 at 19:21


















          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.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • 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%2f466221%2fdraw-an-array-of-lines-and-vectors-in-tikz%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

          Morgemoulin

          Scott Moir

          Souastre