Drawing a Grid/Tikz imageLaTeX equivalent of ConTeXt buffersHow can I put a coloured outline around fraction...

Why does Arabsat 6A need a Falcon Heavy to launch

Why do I get two different answers for this counting problem?

Can I ask the recruiters in my resume to put the reason why I am rejected?

Assassin's bullet with mercury

When a company launches a new product do they "come out" with a new product or do they "come up" with a new product?

intersection of two sorted vectors in C++

Why does Kotter return in Welcome Back Kotter

A reference to a well-known characterization of scattered compact spaces

How to show the equivalence between the regularized regression and their constraint formulas using KKT

How can saying a song's name be a copyright violation?

What exploit are these user agents trying to use?

What to put in ESTA if staying in US for a few days before going on to Canada

Infinite Abelian subgroup of infinite non Abelian group example

What's the difference between 'rename' and 'mv'?

How can I tell someone that I want to be his or her friend?

1960's book about a plague that kills all white people

Is it inappropriate for a student to attend their mentor's dissertation defense?

What is going on with Captain Marvel's blood colour?

Emailing HOD to enhance faculty application

Why are electrically insulating heatsinks so rare? Is it just cost?

Alternative to sending password over mail?

Blender 2.8 I can't see vertices, edges or faces in edit mode

How can I prevent hyper evolved versions of regular creatures from wiping out their cousins?

Why is consensus so controversial in Britain?



Drawing a Grid/Tikz image


LaTeX equivalent of ConTeXt buffersHow can I put a coloured outline around fraction lines?Rotate a node but not its content: the case of the ellipse decorationHow to define the default vertical distance between nodes?Numerical conditional within tikz keys?TikZ: Drawing an arc from an intersection to an intersectionDrawing rectilinear curves in Tikz, aka an Etch-a-Sketch drawingLine up nested tikz enviroments or how to get rid of themHow to draw a square and its diagonals with arrows?begin{figure}… end{figure} is not working with tikz package













6















I need to draw something like this (forgive me, it is very crude), to denote the dependencies in my algorithm.
Basically, I want to say that the circle (l,r) has incoming arrows from the 3 other circles (l,r-1), (l-1,r-1) and (l-1,r).
I could only come up with a grid, using Tikz. how does one draw the dependency arrows and nodes as in the below image?



documentclass[24point]{article}
usepackage{tikz}

begin{document}

begin{tikzpicture}
draw[step=0.5cm,color=gray] (-1,-1) grid (1,1);
foreach x/y/m in {+0.75/+0.75/,-0.75/-0.75/} % etc
node at (x,y) {m};
end{tikzpicture}%

end{document}











share|improve this question




















  • 1





    Here it would probably make sense to use a matrix of nodes and interconnecting those rather than a foreach approach.

    – Claudio Fiandrino
    13 hours ago











  • @ClaudioFiandrino Any references are welcome.

    – GermanShepherd
    13 hours ago













  • @ClaudioFiandrino Hiiiiiiiiiii :-). My affectionate regards.

    – Sebastiano
    13 hours ago
















6















I need to draw something like this (forgive me, it is very crude), to denote the dependencies in my algorithm.
Basically, I want to say that the circle (l,r) has incoming arrows from the 3 other circles (l,r-1), (l-1,r-1) and (l-1,r).
I could only come up with a grid, using Tikz. how does one draw the dependency arrows and nodes as in the below image?



documentclass[24point]{article}
usepackage{tikz}

begin{document}

begin{tikzpicture}
draw[step=0.5cm,color=gray] (-1,-1) grid (1,1);
foreach x/y/m in {+0.75/+0.75/,-0.75/-0.75/} % etc
node at (x,y) {m};
end{tikzpicture}%

end{document}











share|improve this question




















  • 1





    Here it would probably make sense to use a matrix of nodes and interconnecting those rather than a foreach approach.

    – Claudio Fiandrino
    13 hours ago











  • @ClaudioFiandrino Any references are welcome.

    – GermanShepherd
    13 hours ago













  • @ClaudioFiandrino Hiiiiiiiiiii :-). My affectionate regards.

    – Sebastiano
    13 hours ago














6












6








6


1






I need to draw something like this (forgive me, it is very crude), to denote the dependencies in my algorithm.
Basically, I want to say that the circle (l,r) has incoming arrows from the 3 other circles (l,r-1), (l-1,r-1) and (l-1,r).
I could only come up with a grid, using Tikz. how does one draw the dependency arrows and nodes as in the below image?



documentclass[24point]{article}
usepackage{tikz}

begin{document}

begin{tikzpicture}
draw[step=0.5cm,color=gray] (-1,-1) grid (1,1);
foreach x/y/m in {+0.75/+0.75/,-0.75/-0.75/} % etc
node at (x,y) {m};
end{tikzpicture}%

end{document}











share|improve this question
















I need to draw something like this (forgive me, it is very crude), to denote the dependencies in my algorithm.
Basically, I want to say that the circle (l,r) has incoming arrows from the 3 other circles (l,r-1), (l-1,r-1) and (l-1,r).
I could only come up with a grid, using Tikz. how does one draw the dependency arrows and nodes as in the below image?



documentclass[24point]{article}
usepackage{tikz}

begin{document}

begin{tikzpicture}
draw[step=0.5cm,color=gray] (-1,-1) grid (1,1);
foreach x/y/m in {+0.75/+0.75/,-0.75/-0.75/} % etc
node at (x,y) {m};
end{tikzpicture}%

end{document}








tikz-pgf diagrams arrows






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 13 hours ago







GermanShepherd

















asked 13 hours ago









GermanShepherdGermanShepherd

604320




604320








  • 1





    Here it would probably make sense to use a matrix of nodes and interconnecting those rather than a foreach approach.

    – Claudio Fiandrino
    13 hours ago











  • @ClaudioFiandrino Any references are welcome.

    – GermanShepherd
    13 hours ago













  • @ClaudioFiandrino Hiiiiiiiiiii :-). My affectionate regards.

    – Sebastiano
    13 hours ago














  • 1





    Here it would probably make sense to use a matrix of nodes and interconnecting those rather than a foreach approach.

    – Claudio Fiandrino
    13 hours ago











  • @ClaudioFiandrino Any references are welcome.

    – GermanShepherd
    13 hours ago













  • @ClaudioFiandrino Hiiiiiiiiiii :-). My affectionate regards.

    – Sebastiano
    13 hours ago








1




1





Here it would probably make sense to use a matrix of nodes and interconnecting those rather than a foreach approach.

– Claudio Fiandrino
13 hours ago





Here it would probably make sense to use a matrix of nodes and interconnecting those rather than a foreach approach.

– Claudio Fiandrino
13 hours ago













@ClaudioFiandrino Any references are welcome.

– GermanShepherd
13 hours ago







@ClaudioFiandrino Any references are welcome.

– GermanShepherd
13 hours ago















@ClaudioFiandrino Hiiiiiiiiiii :-). My affectionate regards.

– Sebastiano
13 hours ago





@ClaudioFiandrino Hiiiiiiiiiii :-). My affectionate regards.

– Sebastiano
13 hours ago










2 Answers
2






active

oldest

votes


















3














I would draw your diagram like this



documentclass[tikz]{standalone}
begin{document}
begin{tikzpicture}[>=stealth]
foreach i in {0,1,2,3.5,4.5,5.5,7,8} {
draw[gray,very thin] (0,i) -- (8.5,i);
draw[gray,very thin] (i,0) -- (i,8.5);
}
draw[<->] (8.5,0) node[below] {$n$} -- (0,0) node[below left] {$(1,1)$} -- (0,8.5) node[left] {$n$};
draw[->] (2,-.5) -- (3,-.5) node[above,near start] {$r$};
foreach i in {2.75,6.25} {
foreach j in {.5,1.5,4,5,7.5} {
node at (i,j) {$cdots$};
node at (j,i) {$vdots$};
}
foreach j in {2.75,6.25}
node at (i,j) {reflectbox{$ddots$}};
}
begin{scope}[every node/.style={
circle,draw,
minimum size=.8cm,
align=center,
font=footnotesize,
inner sep=0pt
}]
node at (4,4) (11) {$scriptstyle l-1$\[-1ex]$scriptstyle r-1$};
node at (5,4) (21) {$scriptstyle l-1$\[-1ex]$scriptstyle r$};
node at (4,5) (12) {$scriptstyle l$\[-1ex]$scriptstyle r-1$};
node at (5,5) (22) {$scriptstyle l$\[-1ex]$scriptstyle r$};
end{scope}
draw[thick,red,->] (11) -- (22);
draw[thick,red,->] (12) to[bend left=45] (22);
draw[thick,red,->] (21) to[bend right=45] (22);
end{tikzpicture}
end{document}


enter image description here






share|improve this answer































    2














    Using a loop here is probably over-killing, but anyway, here is a modification of your code. Single draw command to do this ;)



    documentclass[tikz,border=7pt]{standalone}
    begin{document}
    tikz
    draw[nodes={inner sep=1pt},color=gray]
    (0,0) grid[shift={(-.5,-.5)}] (4,4)
    foreach[count=i] x/y/m in {2/3/a,2/2/b,3/3/c,}{(x,y) node(ni) {m}}
    (n1) edge[red,-latex] (n3)
    (n2) edge[red,-latex] (n3)
    ;
    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%2f483140%2fdrawing-a-grid-tikz-image%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      3














      I would draw your diagram like this



      documentclass[tikz]{standalone}
      begin{document}
      begin{tikzpicture}[>=stealth]
      foreach i in {0,1,2,3.5,4.5,5.5,7,8} {
      draw[gray,very thin] (0,i) -- (8.5,i);
      draw[gray,very thin] (i,0) -- (i,8.5);
      }
      draw[<->] (8.5,0) node[below] {$n$} -- (0,0) node[below left] {$(1,1)$} -- (0,8.5) node[left] {$n$};
      draw[->] (2,-.5) -- (3,-.5) node[above,near start] {$r$};
      foreach i in {2.75,6.25} {
      foreach j in {.5,1.5,4,5,7.5} {
      node at (i,j) {$cdots$};
      node at (j,i) {$vdots$};
      }
      foreach j in {2.75,6.25}
      node at (i,j) {reflectbox{$ddots$}};
      }
      begin{scope}[every node/.style={
      circle,draw,
      minimum size=.8cm,
      align=center,
      font=footnotesize,
      inner sep=0pt
      }]
      node at (4,4) (11) {$scriptstyle l-1$\[-1ex]$scriptstyle r-1$};
      node at (5,4) (21) {$scriptstyle l-1$\[-1ex]$scriptstyle r$};
      node at (4,5) (12) {$scriptstyle l$\[-1ex]$scriptstyle r-1$};
      node at (5,5) (22) {$scriptstyle l$\[-1ex]$scriptstyle r$};
      end{scope}
      draw[thick,red,->] (11) -- (22);
      draw[thick,red,->] (12) to[bend left=45] (22);
      draw[thick,red,->] (21) to[bend right=45] (22);
      end{tikzpicture}
      end{document}


      enter image description here






      share|improve this answer




























        3














        I would draw your diagram like this



        documentclass[tikz]{standalone}
        begin{document}
        begin{tikzpicture}[>=stealth]
        foreach i in {0,1,2,3.5,4.5,5.5,7,8} {
        draw[gray,very thin] (0,i) -- (8.5,i);
        draw[gray,very thin] (i,0) -- (i,8.5);
        }
        draw[<->] (8.5,0) node[below] {$n$} -- (0,0) node[below left] {$(1,1)$} -- (0,8.5) node[left] {$n$};
        draw[->] (2,-.5) -- (3,-.5) node[above,near start] {$r$};
        foreach i in {2.75,6.25} {
        foreach j in {.5,1.5,4,5,7.5} {
        node at (i,j) {$cdots$};
        node at (j,i) {$vdots$};
        }
        foreach j in {2.75,6.25}
        node at (i,j) {reflectbox{$ddots$}};
        }
        begin{scope}[every node/.style={
        circle,draw,
        minimum size=.8cm,
        align=center,
        font=footnotesize,
        inner sep=0pt
        }]
        node at (4,4) (11) {$scriptstyle l-1$\[-1ex]$scriptstyle r-1$};
        node at (5,4) (21) {$scriptstyle l-1$\[-1ex]$scriptstyle r$};
        node at (4,5) (12) {$scriptstyle l$\[-1ex]$scriptstyle r-1$};
        node at (5,5) (22) {$scriptstyle l$\[-1ex]$scriptstyle r$};
        end{scope}
        draw[thick,red,->] (11) -- (22);
        draw[thick,red,->] (12) to[bend left=45] (22);
        draw[thick,red,->] (21) to[bend right=45] (22);
        end{tikzpicture}
        end{document}


        enter image description here






        share|improve this answer


























          3












          3








          3







          I would draw your diagram like this



          documentclass[tikz]{standalone}
          begin{document}
          begin{tikzpicture}[>=stealth]
          foreach i in {0,1,2,3.5,4.5,5.5,7,8} {
          draw[gray,very thin] (0,i) -- (8.5,i);
          draw[gray,very thin] (i,0) -- (i,8.5);
          }
          draw[<->] (8.5,0) node[below] {$n$} -- (0,0) node[below left] {$(1,1)$} -- (0,8.5) node[left] {$n$};
          draw[->] (2,-.5) -- (3,-.5) node[above,near start] {$r$};
          foreach i in {2.75,6.25} {
          foreach j in {.5,1.5,4,5,7.5} {
          node at (i,j) {$cdots$};
          node at (j,i) {$vdots$};
          }
          foreach j in {2.75,6.25}
          node at (i,j) {reflectbox{$ddots$}};
          }
          begin{scope}[every node/.style={
          circle,draw,
          minimum size=.8cm,
          align=center,
          font=footnotesize,
          inner sep=0pt
          }]
          node at (4,4) (11) {$scriptstyle l-1$\[-1ex]$scriptstyle r-1$};
          node at (5,4) (21) {$scriptstyle l-1$\[-1ex]$scriptstyle r$};
          node at (4,5) (12) {$scriptstyle l$\[-1ex]$scriptstyle r-1$};
          node at (5,5) (22) {$scriptstyle l$\[-1ex]$scriptstyle r$};
          end{scope}
          draw[thick,red,->] (11) -- (22);
          draw[thick,red,->] (12) to[bend left=45] (22);
          draw[thick,red,->] (21) to[bend right=45] (22);
          end{tikzpicture}
          end{document}


          enter image description here






          share|improve this answer













          I would draw your diagram like this



          documentclass[tikz]{standalone}
          begin{document}
          begin{tikzpicture}[>=stealth]
          foreach i in {0,1,2,3.5,4.5,5.5,7,8} {
          draw[gray,very thin] (0,i) -- (8.5,i);
          draw[gray,very thin] (i,0) -- (i,8.5);
          }
          draw[<->] (8.5,0) node[below] {$n$} -- (0,0) node[below left] {$(1,1)$} -- (0,8.5) node[left] {$n$};
          draw[->] (2,-.5) -- (3,-.5) node[above,near start] {$r$};
          foreach i in {2.75,6.25} {
          foreach j in {.5,1.5,4,5,7.5} {
          node at (i,j) {$cdots$};
          node at (j,i) {$vdots$};
          }
          foreach j in {2.75,6.25}
          node at (i,j) {reflectbox{$ddots$}};
          }
          begin{scope}[every node/.style={
          circle,draw,
          minimum size=.8cm,
          align=center,
          font=footnotesize,
          inner sep=0pt
          }]
          node at (4,4) (11) {$scriptstyle l-1$\[-1ex]$scriptstyle r-1$};
          node at (5,4) (21) {$scriptstyle l-1$\[-1ex]$scriptstyle r$};
          node at (4,5) (12) {$scriptstyle l$\[-1ex]$scriptstyle r-1$};
          node at (5,5) (22) {$scriptstyle l$\[-1ex]$scriptstyle r$};
          end{scope}
          draw[thick,red,->] (11) -- (22);
          draw[thick,red,->] (12) to[bend left=45] (22);
          draw[thick,red,->] (21) to[bend right=45] (22);
          end{tikzpicture}
          end{document}


          enter image description here







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 11 hours ago









          JouleVJouleV

          10.5k22559




          10.5k22559























              2














              Using a loop here is probably over-killing, but anyway, here is a modification of your code. Single draw command to do this ;)



              documentclass[tikz,border=7pt]{standalone}
              begin{document}
              tikz
              draw[nodes={inner sep=1pt},color=gray]
              (0,0) grid[shift={(-.5,-.5)}] (4,4)
              foreach[count=i] x/y/m in {2/3/a,2/2/b,3/3/c,}{(x,y) node(ni) {m}}
              (n1) edge[red,-latex] (n3)
              (n2) edge[red,-latex] (n3)
              ;
              end{document}



              enter image description here






              share|improve this answer




























                2














                Using a loop here is probably over-killing, but anyway, here is a modification of your code. Single draw command to do this ;)



                documentclass[tikz,border=7pt]{standalone}
                begin{document}
                tikz
                draw[nodes={inner sep=1pt},color=gray]
                (0,0) grid[shift={(-.5,-.5)}] (4,4)
                foreach[count=i] x/y/m in {2/3/a,2/2/b,3/3/c,}{(x,y) node(ni) {m}}
                (n1) edge[red,-latex] (n3)
                (n2) edge[red,-latex] (n3)
                ;
                end{document}



                enter image description here






                share|improve this answer


























                  2












                  2








                  2







                  Using a loop here is probably over-killing, but anyway, here is a modification of your code. Single draw command to do this ;)



                  documentclass[tikz,border=7pt]{standalone}
                  begin{document}
                  tikz
                  draw[nodes={inner sep=1pt},color=gray]
                  (0,0) grid[shift={(-.5,-.5)}] (4,4)
                  foreach[count=i] x/y/m in {2/3/a,2/2/b,3/3/c,}{(x,y) node(ni) {m}}
                  (n1) edge[red,-latex] (n3)
                  (n2) edge[red,-latex] (n3)
                  ;
                  end{document}



                  enter image description here






                  share|improve this answer













                  Using a loop here is probably over-killing, but anyway, here is a modification of your code. Single draw command to do this ;)



                  documentclass[tikz,border=7pt]{standalone}
                  begin{document}
                  tikz
                  draw[nodes={inner sep=1pt},color=gray]
                  (0,0) grid[shift={(-.5,-.5)}] (4,4)
                  foreach[count=i] x/y/m in {2/3/a,2/2/b,3/3/c,}{(x,y) node(ni) {m}}
                  (n1) edge[red,-latex] (n3)
                  (n2) edge[red,-latex] (n3)
                  ;
                  end{document}



                  enter image description here







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 11 hours ago









                  KpymKpym

                  17.7k24191




                  17.7k24191






























                      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%2f483140%2fdrawing-a-grid-tikz-image%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

                      Why not use the yoke to control yaw, as well as pitch and roll? Announcing the arrival of...

                      Couldn't open a raw socket. Error: Permission denied (13) (nmap)Is it possible to run networking commands...

                      VNC viewer RFB protocol error: bad desktop size 0x0I Cannot Type the Key 'd' (lowercase) in VNC Viewer...