Adding labels and comments to a matrixNo tick labels and adding title to groupplot generated plotsTikZ/ERD: node (=Entity) label on the insideTable-like lines in tikz matrixTikz functions and coordinate system: Adding points and labelsAdding simple labels to axes in tikz?Automatically find which nodes are closest, to aid drawing lines within a TikZ matrixAdding comments inside a box on certain slidesAdding Labels and arrows in Tikz graphAdding some simple labelsTikz: Adding Labels to Arrows (Code Given)

What are these arcade games in Ghostbusters 1984?

How do I know what is the origin IP if I ping from a router to a host of an external network in packet tracer?

Why does Mjolnir fall down in Age of Ultron but not in Endgame?

Is real public IP Address hidden when using a system wide proxy in Windows 10?

Pirate democracy at its finest

How strong are Wi-Fi signals?

Binary Search in C++17

Employer asking for online access to bank account - Is this a scam?

Why were helmets and other body armour not commonplace in the 1800s?

What does the view outside my ship traveling at light speed look like?

How to pull out the underlying query syntax being used by dataset?

How do Human Traits Work?

Simple fuzz pedal using breadboard

Why do airplanes use an axial flow jet engine instead of a more compact centrifugal jet engine?

Line of lights moving in a straight line , with a few following

Cipher Block Chaining - How do you change the plaintext of all blocks?

Does the unit of measure matter when you are solving for the diameter of a circumference?

Why does a perfectly-identical repetition of a drawing command given within an earlier loop 𝘯𝘰𝘵 produce exactly the same line?

What is memelemum?

Why are C64 games inconsistent with which joystick port they use?

Is the field of q-series 'dead'?

Is it rude to call a professor by their last name with no prefix in a non-academic setting?

How should I introduce map drawing to my players?

Crossing US border with music files I'm legally allowed to possess



Adding labels and comments to a matrix


No tick labels and adding title to groupplot generated plotsTikZ/ERD: node (=Entity) label on the insideTable-like lines in tikz matrixTikz functions and coordinate system: Adding points and labelsAdding simple labels to axes in tikz?Automatically find which nodes are closest, to aid drawing lines within a TikZ matrixAdding comments inside a box on certain slidesAdding Labels and arrows in Tikz graphAdding some simple labelsTikz: Adding Labels to Arrows (Code Given)













6















Fellows and folks!



I have been fighting to draw what's on the picture for a long time:



enter image description here



I cannot draw those 3 arrows that are pointing to the same comment. Plus, the other two arrows that are pointing to letters "i" and "j". Could you please give me a hand?



This is what I have done so far:



​`beginfigure[H]
centering
begintikzpicture
matrix (A) [matrix of math nodes, nodes in empty cells,
nodes=draw, minimum width=8mm, minimum height=5mm, outer sep=0pt, anchor=center,
row sep=-pgflinewidth, column sep=-pgflinewidth,
row 3/.style = nodes=minimum height=8mm,
row 5/.style = nodes=minimum height=8mm,
column 3/.style = nodes=minimum width=10mm,
column 4/.style = nodes=fill=lightgray,
column 6/.style = nodes=fill=lightgray,
column 7/.style = nodes=minimum width=10mm,]
R & & ;
foreach i [count=xi] in 1,2,dots,$i$, ,$j$,dots,$m-1$,$m$
node[above, font=scriptsize] at (A-1-xi.north) istrut;
foreach i [count=xi] in 1,2,vdots,$u$,vdots,$n-1$,$n$
node[left, font=scriptsize] at (A-xi-1.west) istrut;
foreach i in 2,4,7
draw[dashed] ([shift=(.5mm,-.5mm)]A-i-4.north west) rectangle ([shift=(-.5mm,.5mm)]A-i-6.south east);
endtikzpicture
captionitem based
endfigure`


enter image description here



It does not look good at all. Plus I have done the other version, where I have to calculate the similarity between rows. All I have to do is to transpose the matrix:



enter image description here



beginfigure[H]
centering
begintikzpicture
matrix (A) [matrix of math nodes, nodes in empty cells,
nodes=draw, minimum width=8mm, minimum height=5mm, outer sep=0pt, anchor=center,
row sep=-pgflinewidth, column sep=-pgflinewidth,
row 3/.style = nodes=minimum height=8mm,
row 5/.style = nodes=minimum height=8mm,
column 3/.style = nodes=minimum width=10mm,
column 4/.style = nodes=fill=lightgray,
column 6/.style = nodes=fill=lightgray,
column 7/.style = nodes=minimum width=10mm,]
R & & ;
foreach i [count=xi] in 1,2,dots,$i$, ,$j$,dots,$m-1$,$m$
node[above, font=scriptsize] at (A-1-xi.north) istrut;
foreach i [count=xi] in 1,2,vdots,$u$,vdots,$n-1$,$n$
node[left, font=scriptsize] at (A-xi-1.west) istrut;
foreach i in 2,4,7
draw[dashed] ([shift=(.5mm,-.5mm)]A-i-4.north west) rectangle ([shift=(-.5mm,.5mm)]A-i-6.south east);
endtikzpicture
captionitem based
endfigure


enter image description here










share|improve this question




























    6















    Fellows and folks!



    I have been fighting to draw what's on the picture for a long time:



    enter image description here



    I cannot draw those 3 arrows that are pointing to the same comment. Plus, the other two arrows that are pointing to letters "i" and "j". Could you please give me a hand?



    This is what I have done so far:



    ​`beginfigure[H]
    centering
    begintikzpicture
    matrix (A) [matrix of math nodes, nodes in empty cells,
    nodes=draw, minimum width=8mm, minimum height=5mm, outer sep=0pt, anchor=center,
    row sep=-pgflinewidth, column sep=-pgflinewidth,
    row 3/.style = nodes=minimum height=8mm,
    row 5/.style = nodes=minimum height=8mm,
    column 3/.style = nodes=minimum width=10mm,
    column 4/.style = nodes=fill=lightgray,
    column 6/.style = nodes=fill=lightgray,
    column 7/.style = nodes=minimum width=10mm,]
    R & & ;
    foreach i [count=xi] in 1,2,dots,$i$, ,$j$,dots,$m-1$,$m$
    node[above, font=scriptsize] at (A-1-xi.north) istrut;
    foreach i [count=xi] in 1,2,vdots,$u$,vdots,$n-1$,$n$
    node[left, font=scriptsize] at (A-xi-1.west) istrut;
    foreach i in 2,4,7
    draw[dashed] ([shift=(.5mm,-.5mm)]A-i-4.north west) rectangle ([shift=(-.5mm,.5mm)]A-i-6.south east);
    endtikzpicture
    captionitem based
    endfigure`


    enter image description here



    It does not look good at all. Plus I have done the other version, where I have to calculate the similarity between rows. All I have to do is to transpose the matrix:



    enter image description here



    beginfigure[H]
    centering
    begintikzpicture
    matrix (A) [matrix of math nodes, nodes in empty cells,
    nodes=draw, minimum width=8mm, minimum height=5mm, outer sep=0pt, anchor=center,
    row sep=-pgflinewidth, column sep=-pgflinewidth,
    row 3/.style = nodes=minimum height=8mm,
    row 5/.style = nodes=minimum height=8mm,
    column 3/.style = nodes=minimum width=10mm,
    column 4/.style = nodes=fill=lightgray,
    column 6/.style = nodes=fill=lightgray,
    column 7/.style = nodes=minimum width=10mm,]
    R & & ;
    foreach i [count=xi] in 1,2,dots,$i$, ,$j$,dots,$m-1$,$m$
    node[above, font=scriptsize] at (A-1-xi.north) istrut;
    foreach i [count=xi] in 1,2,vdots,$u$,vdots,$n-1$,$n$
    node[left, font=scriptsize] at (A-xi-1.west) istrut;
    foreach i in 2,4,7
    draw[dashed] ([shift=(.5mm,-.5mm)]A-i-4.north west) rectangle ([shift=(-.5mm,.5mm)]A-i-6.south east);
    endtikzpicture
    captionitem based
    endfigure


    enter image description here










    share|improve this question


























      6












      6








      6


      1






      Fellows and folks!



      I have been fighting to draw what's on the picture for a long time:



      enter image description here



      I cannot draw those 3 arrows that are pointing to the same comment. Plus, the other two arrows that are pointing to letters "i" and "j". Could you please give me a hand?



      This is what I have done so far:



      ​`beginfigure[H]
      centering
      begintikzpicture
      matrix (A) [matrix of math nodes, nodes in empty cells,
      nodes=draw, minimum width=8mm, minimum height=5mm, outer sep=0pt, anchor=center,
      row sep=-pgflinewidth, column sep=-pgflinewidth,
      row 3/.style = nodes=minimum height=8mm,
      row 5/.style = nodes=minimum height=8mm,
      column 3/.style = nodes=minimum width=10mm,
      column 4/.style = nodes=fill=lightgray,
      column 6/.style = nodes=fill=lightgray,
      column 7/.style = nodes=minimum width=10mm,]
      R & & ;
      foreach i [count=xi] in 1,2,dots,$i$, ,$j$,dots,$m-1$,$m$
      node[above, font=scriptsize] at (A-1-xi.north) istrut;
      foreach i [count=xi] in 1,2,vdots,$u$,vdots,$n-1$,$n$
      node[left, font=scriptsize] at (A-xi-1.west) istrut;
      foreach i in 2,4,7
      draw[dashed] ([shift=(.5mm,-.5mm)]A-i-4.north west) rectangle ([shift=(-.5mm,.5mm)]A-i-6.south east);
      endtikzpicture
      captionitem based
      endfigure`


      enter image description here



      It does not look good at all. Plus I have done the other version, where I have to calculate the similarity between rows. All I have to do is to transpose the matrix:



      enter image description here



      beginfigure[H]
      centering
      begintikzpicture
      matrix (A) [matrix of math nodes, nodes in empty cells,
      nodes=draw, minimum width=8mm, minimum height=5mm, outer sep=0pt, anchor=center,
      row sep=-pgflinewidth, column sep=-pgflinewidth,
      row 3/.style = nodes=minimum height=8mm,
      row 5/.style = nodes=minimum height=8mm,
      column 3/.style = nodes=minimum width=10mm,
      column 4/.style = nodes=fill=lightgray,
      column 6/.style = nodes=fill=lightgray,
      column 7/.style = nodes=minimum width=10mm,]
      R & & ;
      foreach i [count=xi] in 1,2,dots,$i$, ,$j$,dots,$m-1$,$m$
      node[above, font=scriptsize] at (A-1-xi.north) istrut;
      foreach i [count=xi] in 1,2,vdots,$u$,vdots,$n-1$,$n$
      node[left, font=scriptsize] at (A-xi-1.west) istrut;
      foreach i in 2,4,7
      draw[dashed] ([shift=(.5mm,-.5mm)]A-i-4.north west) rectangle ([shift=(-.5mm,.5mm)]A-i-6.south east);
      endtikzpicture
      captionitem based
      endfigure


      enter image description here










      share|improve this question
















      Fellows and folks!



      I have been fighting to draw what's on the picture for a long time:



      enter image description here



      I cannot draw those 3 arrows that are pointing to the same comment. Plus, the other two arrows that are pointing to letters "i" and "j". Could you please give me a hand?



      This is what I have done so far:



      ​`beginfigure[H]
      centering
      begintikzpicture
      matrix (A) [matrix of math nodes, nodes in empty cells,
      nodes=draw, minimum width=8mm, minimum height=5mm, outer sep=0pt, anchor=center,
      row sep=-pgflinewidth, column sep=-pgflinewidth,
      row 3/.style = nodes=minimum height=8mm,
      row 5/.style = nodes=minimum height=8mm,
      column 3/.style = nodes=minimum width=10mm,
      column 4/.style = nodes=fill=lightgray,
      column 6/.style = nodes=fill=lightgray,
      column 7/.style = nodes=minimum width=10mm,]
      R & & ;
      foreach i [count=xi] in 1,2,dots,$i$, ,$j$,dots,$m-1$,$m$
      node[above, font=scriptsize] at (A-1-xi.north) istrut;
      foreach i [count=xi] in 1,2,vdots,$u$,vdots,$n-1$,$n$
      node[left, font=scriptsize] at (A-xi-1.west) istrut;
      foreach i in 2,4,7
      draw[dashed] ([shift=(.5mm,-.5mm)]A-i-4.north west) rectangle ([shift=(-.5mm,.5mm)]A-i-6.south east);
      endtikzpicture
      captionitem based
      endfigure`


      enter image description here



      It does not look good at all. Plus I have done the other version, where I have to calculate the similarity between rows. All I have to do is to transpose the matrix:



      enter image description here



      beginfigure[H]
      centering
      begintikzpicture
      matrix (A) [matrix of math nodes, nodes in empty cells,
      nodes=draw, minimum width=8mm, minimum height=5mm, outer sep=0pt, anchor=center,
      row sep=-pgflinewidth, column sep=-pgflinewidth,
      row 3/.style = nodes=minimum height=8mm,
      row 5/.style = nodes=minimum height=8mm,
      column 3/.style = nodes=minimum width=10mm,
      column 4/.style = nodes=fill=lightgray,
      column 6/.style = nodes=fill=lightgray,
      column 7/.style = nodes=minimum width=10mm,]
      R & & ;
      foreach i [count=xi] in 1,2,dots,$i$, ,$j$,dots,$m-1$,$m$
      node[above, font=scriptsize] at (A-1-xi.north) istrut;
      foreach i [count=xi] in 1,2,vdots,$u$,vdots,$n-1$,$n$
      node[left, font=scriptsize] at (A-xi-1.west) istrut;
      foreach i in 2,4,7
      draw[dashed] ([shift=(.5mm,-.5mm)]A-i-4.north west) rectangle ([shift=(-.5mm,.5mm)]A-i-6.south east);
      endtikzpicture
      captionitem based
      endfigure


      enter image description here







      tikz-pgf






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited May 14 at 5:59









      Stefan Pinnow

      20.5k83578




      20.5k83578










      asked May 13 at 20:04









      naveganteXnaveganteX

      3588




      3588




















          2 Answers
          2






          active

          oldest

          votes


















          7














          Here's one possible option, using the fit and positioning libraries, and relative coordinates for the arrows on top. See comments in the code, ask if I should expand on anything.



          enter image description here



          documentclass[border=5mm]standalone
          usepackagetikz
          usetikzlibrary
          matrix,
          positioning, % added
          fit % added

          begindocument
          begintikzpicture
          matrix (A) [matrix of math nodes, nodes in empty cells,
          nodes=draw, minimum width=8mm, minimum height=5mm, outer sep=0pt, anchor=center,
          row sep=-pgflinewidth, column sep=-pgflinewidth,
          row 3/.style = nodes=minimum height=8mm,
          row 5/.style = nodes=minimum height=8mm,
          column 3/.style = nodes=minimum width=10mm,
          row 4/.style = nodes=fill=lightgray,
          row 6/.style = nodes=fill=lightgray,
          column 7/.style = nodes=minimum width=10mm,]
          [draw,fill=blue!20];

          % draw the box below
          node [draw,
          text width=3cm,
          below=of A,
          name=textbox
          ] Lorem ipsum dolor sit amet etc. etc. ad infinitum;


          foreach i [count=xi] in 1,2,vdots,$i$, ,$j$,vdots,$m-1$,$m$
          node[left, font=scriptsize,name=l-xi] at (A-xi-1.west) istrut;
          foreach i [count=xi] in 1,2,dots,$u$,dots,$n-1$,$n$
          node[above, font=scriptsize] at (A-1-xi.north) istrut;

          foreach i in 1,3,7

          % use the fit library instead of drawing box manually, then you get a node you can refer to
          node [fit=(A-4-i)(A-6-i), inner sep=-0.5mm, draw, dashed, name=Ri] ;
          % draw arrow from textbox node
          draw [<-] (Ri.south) -- (textbox);



          % draw arrows from the nodes using the names defined with the modification of the loop above
          % and relative coordinates. Add helper coordinate on the first arrow
          draw [<-] (l-4) -- coordinate[pos=0.6] (s1) ++(-15mm,0);
          draw [<-] (l-6) -- ++(-15mm,0);
          % draw arrow between the helper coordinate s1 and the point that has the x-coordinate of t-6 and the y-coordinate of s1
          draw [<->] (s1) -- node[fill=white,font=scriptsize,inner sep=1pt] $s_i,j=?$ (l-6 -| s1);

          endtikzpicture
          begintikzpicture
          matrix (A) [matrix of math nodes, nodes in empty cells,
          nodes=draw, minimum width=8mm, minimum height=5mm, outer sep=0pt, anchor=center,
          row sep=-pgflinewidth, column sep=-pgflinewidth,
          row 3/.style = nodes=minimum height=8mm,
          row 5/.style = nodes=minimum height=8mm,
          column 3/.style = nodes=minimum width=10mm,
          column 4/.style = nodes=fill=lightgray,
          column 6/.style = nodes=fill=lightgray,
          column 7/.style = nodes=minimum width=10mm,]
          R & & ;

          % draw the box on the right
          node [draw,
          text width=3cm,
          right=of A,
          name=textbox
          ] Lorem ipsum dolor sit amet etc. etc. ad infinitum;


          foreach i [count=xi] in 1,2,dots,$i$, ,$j$,dots,$m-1$,$m$
          % added name=t-xi to the following
          node[above, font=scriptsize, name=t-xi] at (A-1-xi.north) istrut;
          foreach i [count=xi] in 1,2,vdots,$u$,vdots,$n-1$,$n$
          node[left, font=scriptsize] at (A-xi-1.west) istrut;
          foreach i in 2,4,7

          % use the fit library instead of drawing box manually, then you get a node you can refer to
          node [fit=(A-i-4)(A-i-6), inner sep=-0.5mm, draw, dashed, name=Ri] ;
          % draw arrow from textbox node
          draw [<-] (Ri.east) -- (textbox);



          % draw arrows from the nodes using the names defined with the modification of the loop above
          % and relative coordinates. Add helper coordinate on the first arrow
          draw [<-] (t-4) -- coordinate[pos=0.6] (s1) ++(0,15mm);
          draw [<-] (t-6) -- ++(0,15mm);
          % draw arrow between the helper coordinate s1 and the point that has the x-coordinate of t-6 and the y-coordinate of s1
          draw [<->] (s1) -- node[fill=white,font=scriptsize,inner sep=1pt] $s_i,j=?$ (t-6 |- s1);

          endtikzpicture

          enddocument





          share|improve this answer




















          • 2





            @naveganteX Well, you can use exactly the same techniques for that.

            – Torbjørn T.
            May 13 at 20:47






          • 1





            @naveganteX Basically to transpose the matrix you just have to do it by hand I think, i.e. rewrite it. And change styles/anchors etc. that refer to rows so they refer to columns, and vice versa.

            – Torbjørn T.
            May 13 at 21:00






          • 1





            @naveganteX Did a quick transpose, see updated answer. Might have gotten some things wrong though, but you'll probably be able to fix that, considering where you had gotten to in the first place.

            – Torbjørn T.
            May 13 at 21:06






          • 1





            @naveganteX Replace dashed with rounded corners.

            – Torbjørn T.
            May 13 at 21:21






          • 1





            @naveganteX You already know how to do that ... At least you had done it two places in your original code. font=small (or some other font size switch)

            – Torbjørn T.
            May 13 at 23:17


















          4














          Very similar to Torbjørn T's nice answer except that the border of the comment is as in your figure (and drawn via path picture, i.e. you can make it a style if you use such things more often).



          documentclass[tikz,border=3.14mm]standalone
          usetikzlibrarymatrix,fit,positioning

          begindocument
          begintikzpicture
          matrix (A) [matrix of math nodes, nodes in empty cells,
          nodes=draw, minimum width=8mm, minimum height=5mm, outer sep=0pt,
          anchor=center,row sep=-pgflinewidth, column sep=-pgflinewidth,
          row 3/.style = nodes=minimum height=8mm,
          row 5/.style = nodes=minimum height=8mm,
          column 3/.style = nodes=minimum width=10mm,
          column 4/.style = nodes=fill=lightgray,
          column 6/.style = nodes=fill=lightgray,
          column 7/.style = nodes=minimum width=10mm,]
          R & & ;
          foreach i [count=xi] in 1,2,dots,$i$, ,$j$,dots,$m-1$,$m$
          node[above, font=scriptsize] at (A-1-xi.north) istrut;
          foreach i [count=xi] in 1,2,vdots,$u$,vdots,$n-1$,$n$
          node[left, font=scriptsize] at (A-xi-1.west) istrut;
          node[right=1cm of A,align=left,text width=4cm,path picture=
          draw ([xshift=1em,yshift=-pgflinewidth]path picture bounding box.north west) -] (txt)%
          Some very long text about ducks, koalas and marmots which is very long and deals
          with ducks, koalas and marmots. dots;
          foreach i in 2,4,7
          node[draw,rounded corners,fit=(A-i-4)(A-i-6),inner xsep=-1ex,
          inner ysep=-0.3ex] (F-i);
          draw[-latex] (txt) -- (F-i.east);


          endtikzpicture
          enddocument


          enter image description here






          share|improve this answer























          • The one! Thank you very much! Is there any way that you can transpose the matrix and draw the second model?

            – naveganteX
            May 13 at 20:58






          • 1





            @naveganteX AFAIK there is no automatic way, matrices are very immune to transformations. So one needs to do what Torbjørn T. is saying: transpose it by rewriting it. Any attempt to use transform canvas will extremely likely fail at a given point.

            – marmot
            May 13 at 21:06











          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%2f490705%2fadding-labels-and-comments-to-a-matrix%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









          7














          Here's one possible option, using the fit and positioning libraries, and relative coordinates for the arrows on top. See comments in the code, ask if I should expand on anything.



          enter image description here



          documentclass[border=5mm]standalone
          usepackagetikz
          usetikzlibrary
          matrix,
          positioning, % added
          fit % added

          begindocument
          begintikzpicture
          matrix (A) [matrix of math nodes, nodes in empty cells,
          nodes=draw, minimum width=8mm, minimum height=5mm, outer sep=0pt, anchor=center,
          row sep=-pgflinewidth, column sep=-pgflinewidth,
          row 3/.style = nodes=minimum height=8mm,
          row 5/.style = nodes=minimum height=8mm,
          column 3/.style = nodes=minimum width=10mm,
          row 4/.style = nodes=fill=lightgray,
          row 6/.style = nodes=fill=lightgray,
          column 7/.style = nodes=minimum width=10mm,]
          [draw,fill=blue!20];

          % draw the box below
          node [draw,
          text width=3cm,
          below=of A,
          name=textbox
          ] Lorem ipsum dolor sit amet etc. etc. ad infinitum;


          foreach i [count=xi] in 1,2,vdots,$i$, ,$j$,vdots,$m-1$,$m$
          node[left, font=scriptsize,name=l-xi] at (A-xi-1.west) istrut;
          foreach i [count=xi] in 1,2,dots,$u$,dots,$n-1$,$n$
          node[above, font=scriptsize] at (A-1-xi.north) istrut;

          foreach i in 1,3,7

          % use the fit library instead of drawing box manually, then you get a node you can refer to
          node [fit=(A-4-i)(A-6-i), inner sep=-0.5mm, draw, dashed, name=Ri] ;
          % draw arrow from textbox node
          draw [<-] (Ri.south) -- (textbox);



          % draw arrows from the nodes using the names defined with the modification of the loop above
          % and relative coordinates. Add helper coordinate on the first arrow
          draw [<-] (l-4) -- coordinate[pos=0.6] (s1) ++(-15mm,0);
          draw [<-] (l-6) -- ++(-15mm,0);
          % draw arrow between the helper coordinate s1 and the point that has the x-coordinate of t-6 and the y-coordinate of s1
          draw [<->] (s1) -- node[fill=white,font=scriptsize,inner sep=1pt] $s_i,j=?$ (l-6 -| s1);

          endtikzpicture
          begintikzpicture
          matrix (A) [matrix of math nodes, nodes in empty cells,
          nodes=draw, minimum width=8mm, minimum height=5mm, outer sep=0pt, anchor=center,
          row sep=-pgflinewidth, column sep=-pgflinewidth,
          row 3/.style = nodes=minimum height=8mm,
          row 5/.style = nodes=minimum height=8mm,
          column 3/.style = nodes=minimum width=10mm,
          column 4/.style = nodes=fill=lightgray,
          column 6/.style = nodes=fill=lightgray,
          column 7/.style = nodes=minimum width=10mm,]
          R & & ;

          % draw the box on the right
          node [draw,
          text width=3cm,
          right=of A,
          name=textbox
          ] Lorem ipsum dolor sit amet etc. etc. ad infinitum;


          foreach i [count=xi] in 1,2,dots,$i$, ,$j$,dots,$m-1$,$m$
          % added name=t-xi to the following
          node[above, font=scriptsize, name=t-xi] at (A-1-xi.north) istrut;
          foreach i [count=xi] in 1,2,vdots,$u$,vdots,$n-1$,$n$
          node[left, font=scriptsize] at (A-xi-1.west) istrut;
          foreach i in 2,4,7

          % use the fit library instead of drawing box manually, then you get a node you can refer to
          node [fit=(A-i-4)(A-i-6), inner sep=-0.5mm, draw, dashed, name=Ri] ;
          % draw arrow from textbox node
          draw [<-] (Ri.east) -- (textbox);



          % draw arrows from the nodes using the names defined with the modification of the loop above
          % and relative coordinates. Add helper coordinate on the first arrow
          draw [<-] (t-4) -- coordinate[pos=0.6] (s1) ++(0,15mm);
          draw [<-] (t-6) -- ++(0,15mm);
          % draw arrow between the helper coordinate s1 and the point that has the x-coordinate of t-6 and the y-coordinate of s1
          draw [<->] (s1) -- node[fill=white,font=scriptsize,inner sep=1pt] $s_i,j=?$ (t-6 |- s1);

          endtikzpicture

          enddocument





          share|improve this answer




















          • 2





            @naveganteX Well, you can use exactly the same techniques for that.

            – Torbjørn T.
            May 13 at 20:47






          • 1





            @naveganteX Basically to transpose the matrix you just have to do it by hand I think, i.e. rewrite it. And change styles/anchors etc. that refer to rows so they refer to columns, and vice versa.

            – Torbjørn T.
            May 13 at 21:00






          • 1





            @naveganteX Did a quick transpose, see updated answer. Might have gotten some things wrong though, but you'll probably be able to fix that, considering where you had gotten to in the first place.

            – Torbjørn T.
            May 13 at 21:06






          • 1





            @naveganteX Replace dashed with rounded corners.

            – Torbjørn T.
            May 13 at 21:21






          • 1





            @naveganteX You already know how to do that ... At least you had done it two places in your original code. font=small (or some other font size switch)

            – Torbjørn T.
            May 13 at 23:17















          7














          Here's one possible option, using the fit and positioning libraries, and relative coordinates for the arrows on top. See comments in the code, ask if I should expand on anything.



          enter image description here



          documentclass[border=5mm]standalone
          usepackagetikz
          usetikzlibrary
          matrix,
          positioning, % added
          fit % added

          begindocument
          begintikzpicture
          matrix (A) [matrix of math nodes, nodes in empty cells,
          nodes=draw, minimum width=8mm, minimum height=5mm, outer sep=0pt, anchor=center,
          row sep=-pgflinewidth, column sep=-pgflinewidth,
          row 3/.style = nodes=minimum height=8mm,
          row 5/.style = nodes=minimum height=8mm,
          column 3/.style = nodes=minimum width=10mm,
          row 4/.style = nodes=fill=lightgray,
          row 6/.style = nodes=fill=lightgray,
          column 7/.style = nodes=minimum width=10mm,]
          [draw,fill=blue!20];

          % draw the box below
          node [draw,
          text width=3cm,
          below=of A,
          name=textbox
          ] Lorem ipsum dolor sit amet etc. etc. ad infinitum;


          foreach i [count=xi] in 1,2,vdots,$i$, ,$j$,vdots,$m-1$,$m$
          node[left, font=scriptsize,name=l-xi] at (A-xi-1.west) istrut;
          foreach i [count=xi] in 1,2,dots,$u$,dots,$n-1$,$n$
          node[above, font=scriptsize] at (A-1-xi.north) istrut;

          foreach i in 1,3,7

          % use the fit library instead of drawing box manually, then you get a node you can refer to
          node [fit=(A-4-i)(A-6-i), inner sep=-0.5mm, draw, dashed, name=Ri] ;
          % draw arrow from textbox node
          draw [<-] (Ri.south) -- (textbox);



          % draw arrows from the nodes using the names defined with the modification of the loop above
          % and relative coordinates. Add helper coordinate on the first arrow
          draw [<-] (l-4) -- coordinate[pos=0.6] (s1) ++(-15mm,0);
          draw [<-] (l-6) -- ++(-15mm,0);
          % draw arrow between the helper coordinate s1 and the point that has the x-coordinate of t-6 and the y-coordinate of s1
          draw [<->] (s1) -- node[fill=white,font=scriptsize,inner sep=1pt] $s_i,j=?$ (l-6 -| s1);

          endtikzpicture
          begintikzpicture
          matrix (A) [matrix of math nodes, nodes in empty cells,
          nodes=draw, minimum width=8mm, minimum height=5mm, outer sep=0pt, anchor=center,
          row sep=-pgflinewidth, column sep=-pgflinewidth,
          row 3/.style = nodes=minimum height=8mm,
          row 5/.style = nodes=minimum height=8mm,
          column 3/.style = nodes=minimum width=10mm,
          column 4/.style = nodes=fill=lightgray,
          column 6/.style = nodes=fill=lightgray,
          column 7/.style = nodes=minimum width=10mm,]
          R & & ;

          % draw the box on the right
          node [draw,
          text width=3cm,
          right=of A,
          name=textbox
          ] Lorem ipsum dolor sit amet etc. etc. ad infinitum;


          foreach i [count=xi] in 1,2,dots,$i$, ,$j$,dots,$m-1$,$m$
          % added name=t-xi to the following
          node[above, font=scriptsize, name=t-xi] at (A-1-xi.north) istrut;
          foreach i [count=xi] in 1,2,vdots,$u$,vdots,$n-1$,$n$
          node[left, font=scriptsize] at (A-xi-1.west) istrut;
          foreach i in 2,4,7

          % use the fit library instead of drawing box manually, then you get a node you can refer to
          node [fit=(A-i-4)(A-i-6), inner sep=-0.5mm, draw, dashed, name=Ri] ;
          % draw arrow from textbox node
          draw [<-] (Ri.east) -- (textbox);



          % draw arrows from the nodes using the names defined with the modification of the loop above
          % and relative coordinates. Add helper coordinate on the first arrow
          draw [<-] (t-4) -- coordinate[pos=0.6] (s1) ++(0,15mm);
          draw [<-] (t-6) -- ++(0,15mm);
          % draw arrow between the helper coordinate s1 and the point that has the x-coordinate of t-6 and the y-coordinate of s1
          draw [<->] (s1) -- node[fill=white,font=scriptsize,inner sep=1pt] $s_i,j=?$ (t-6 |- s1);

          endtikzpicture

          enddocument





          share|improve this answer




















          • 2





            @naveganteX Well, you can use exactly the same techniques for that.

            – Torbjørn T.
            May 13 at 20:47






          • 1





            @naveganteX Basically to transpose the matrix you just have to do it by hand I think, i.e. rewrite it. And change styles/anchors etc. that refer to rows so they refer to columns, and vice versa.

            – Torbjørn T.
            May 13 at 21:00






          • 1





            @naveganteX Did a quick transpose, see updated answer. Might have gotten some things wrong though, but you'll probably be able to fix that, considering where you had gotten to in the first place.

            – Torbjørn T.
            May 13 at 21:06






          • 1





            @naveganteX Replace dashed with rounded corners.

            – Torbjørn T.
            May 13 at 21:21






          • 1





            @naveganteX You already know how to do that ... At least you had done it two places in your original code. font=small (or some other font size switch)

            – Torbjørn T.
            May 13 at 23:17













          7












          7








          7







          Here's one possible option, using the fit and positioning libraries, and relative coordinates for the arrows on top. See comments in the code, ask if I should expand on anything.



          enter image description here



          documentclass[border=5mm]standalone
          usepackagetikz
          usetikzlibrary
          matrix,
          positioning, % added
          fit % added

          begindocument
          begintikzpicture
          matrix (A) [matrix of math nodes, nodes in empty cells,
          nodes=draw, minimum width=8mm, minimum height=5mm, outer sep=0pt, anchor=center,
          row sep=-pgflinewidth, column sep=-pgflinewidth,
          row 3/.style = nodes=minimum height=8mm,
          row 5/.style = nodes=minimum height=8mm,
          column 3/.style = nodes=minimum width=10mm,
          row 4/.style = nodes=fill=lightgray,
          row 6/.style = nodes=fill=lightgray,
          column 7/.style = nodes=minimum width=10mm,]
          [draw,fill=blue!20];

          % draw the box below
          node [draw,
          text width=3cm,
          below=of A,
          name=textbox
          ] Lorem ipsum dolor sit amet etc. etc. ad infinitum;


          foreach i [count=xi] in 1,2,vdots,$i$, ,$j$,vdots,$m-1$,$m$
          node[left, font=scriptsize,name=l-xi] at (A-xi-1.west) istrut;
          foreach i [count=xi] in 1,2,dots,$u$,dots,$n-1$,$n$
          node[above, font=scriptsize] at (A-1-xi.north) istrut;

          foreach i in 1,3,7

          % use the fit library instead of drawing box manually, then you get a node you can refer to
          node [fit=(A-4-i)(A-6-i), inner sep=-0.5mm, draw, dashed, name=Ri] ;
          % draw arrow from textbox node
          draw [<-] (Ri.south) -- (textbox);



          % draw arrows from the nodes using the names defined with the modification of the loop above
          % and relative coordinates. Add helper coordinate on the first arrow
          draw [<-] (l-4) -- coordinate[pos=0.6] (s1) ++(-15mm,0);
          draw [<-] (l-6) -- ++(-15mm,0);
          % draw arrow between the helper coordinate s1 and the point that has the x-coordinate of t-6 and the y-coordinate of s1
          draw [<->] (s1) -- node[fill=white,font=scriptsize,inner sep=1pt] $s_i,j=?$ (l-6 -| s1);

          endtikzpicture
          begintikzpicture
          matrix (A) [matrix of math nodes, nodes in empty cells,
          nodes=draw, minimum width=8mm, minimum height=5mm, outer sep=0pt, anchor=center,
          row sep=-pgflinewidth, column sep=-pgflinewidth,
          row 3/.style = nodes=minimum height=8mm,
          row 5/.style = nodes=minimum height=8mm,
          column 3/.style = nodes=minimum width=10mm,
          column 4/.style = nodes=fill=lightgray,
          column 6/.style = nodes=fill=lightgray,
          column 7/.style = nodes=minimum width=10mm,]
          R & & ;

          % draw the box on the right
          node [draw,
          text width=3cm,
          right=of A,
          name=textbox
          ] Lorem ipsum dolor sit amet etc. etc. ad infinitum;


          foreach i [count=xi] in 1,2,dots,$i$, ,$j$,dots,$m-1$,$m$
          % added name=t-xi to the following
          node[above, font=scriptsize, name=t-xi] at (A-1-xi.north) istrut;
          foreach i [count=xi] in 1,2,vdots,$u$,vdots,$n-1$,$n$
          node[left, font=scriptsize] at (A-xi-1.west) istrut;
          foreach i in 2,4,7

          % use the fit library instead of drawing box manually, then you get a node you can refer to
          node [fit=(A-i-4)(A-i-6), inner sep=-0.5mm, draw, dashed, name=Ri] ;
          % draw arrow from textbox node
          draw [<-] (Ri.east) -- (textbox);



          % draw arrows from the nodes using the names defined with the modification of the loop above
          % and relative coordinates. Add helper coordinate on the first arrow
          draw [<-] (t-4) -- coordinate[pos=0.6] (s1) ++(0,15mm);
          draw [<-] (t-6) -- ++(0,15mm);
          % draw arrow between the helper coordinate s1 and the point that has the x-coordinate of t-6 and the y-coordinate of s1
          draw [<->] (s1) -- node[fill=white,font=scriptsize,inner sep=1pt] $s_i,j=?$ (t-6 |- s1);

          endtikzpicture

          enddocument





          share|improve this answer















          Here's one possible option, using the fit and positioning libraries, and relative coordinates for the arrows on top. See comments in the code, ask if I should expand on anything.



          enter image description here



          documentclass[border=5mm]standalone
          usepackagetikz
          usetikzlibrary
          matrix,
          positioning, % added
          fit % added

          begindocument
          begintikzpicture
          matrix (A) [matrix of math nodes, nodes in empty cells,
          nodes=draw, minimum width=8mm, minimum height=5mm, outer sep=0pt, anchor=center,
          row sep=-pgflinewidth, column sep=-pgflinewidth,
          row 3/.style = nodes=minimum height=8mm,
          row 5/.style = nodes=minimum height=8mm,
          column 3/.style = nodes=minimum width=10mm,
          row 4/.style = nodes=fill=lightgray,
          row 6/.style = nodes=fill=lightgray,
          column 7/.style = nodes=minimum width=10mm,]
          [draw,fill=blue!20];

          % draw the box below
          node [draw,
          text width=3cm,
          below=of A,
          name=textbox
          ] Lorem ipsum dolor sit amet etc. etc. ad infinitum;


          foreach i [count=xi] in 1,2,vdots,$i$, ,$j$,vdots,$m-1$,$m$
          node[left, font=scriptsize,name=l-xi] at (A-xi-1.west) istrut;
          foreach i [count=xi] in 1,2,dots,$u$,dots,$n-1$,$n$
          node[above, font=scriptsize] at (A-1-xi.north) istrut;

          foreach i in 1,3,7

          % use the fit library instead of drawing box manually, then you get a node you can refer to
          node [fit=(A-4-i)(A-6-i), inner sep=-0.5mm, draw, dashed, name=Ri] ;
          % draw arrow from textbox node
          draw [<-] (Ri.south) -- (textbox);



          % draw arrows from the nodes using the names defined with the modification of the loop above
          % and relative coordinates. Add helper coordinate on the first arrow
          draw [<-] (l-4) -- coordinate[pos=0.6] (s1) ++(-15mm,0);
          draw [<-] (l-6) -- ++(-15mm,0);
          % draw arrow between the helper coordinate s1 and the point that has the x-coordinate of t-6 and the y-coordinate of s1
          draw [<->] (s1) -- node[fill=white,font=scriptsize,inner sep=1pt] $s_i,j=?$ (l-6 -| s1);

          endtikzpicture
          begintikzpicture
          matrix (A) [matrix of math nodes, nodes in empty cells,
          nodes=draw, minimum width=8mm, minimum height=5mm, outer sep=0pt, anchor=center,
          row sep=-pgflinewidth, column sep=-pgflinewidth,
          row 3/.style = nodes=minimum height=8mm,
          row 5/.style = nodes=minimum height=8mm,
          column 3/.style = nodes=minimum width=10mm,
          column 4/.style = nodes=fill=lightgray,
          column 6/.style = nodes=fill=lightgray,
          column 7/.style = nodes=minimum width=10mm,]
          R & & ;

          % draw the box on the right
          node [draw,
          text width=3cm,
          right=of A,
          name=textbox
          ] Lorem ipsum dolor sit amet etc. etc. ad infinitum;


          foreach i [count=xi] in 1,2,dots,$i$, ,$j$,dots,$m-1$,$m$
          % added name=t-xi to the following
          node[above, font=scriptsize, name=t-xi] at (A-1-xi.north) istrut;
          foreach i [count=xi] in 1,2,vdots,$u$,vdots,$n-1$,$n$
          node[left, font=scriptsize] at (A-xi-1.west) istrut;
          foreach i in 2,4,7

          % use the fit library instead of drawing box manually, then you get a node you can refer to
          node [fit=(A-i-4)(A-i-6), inner sep=-0.5mm, draw, dashed, name=Ri] ;
          % draw arrow from textbox node
          draw [<-] (Ri.east) -- (textbox);



          % draw arrows from the nodes using the names defined with the modification of the loop above
          % and relative coordinates. Add helper coordinate on the first arrow
          draw [<-] (t-4) -- coordinate[pos=0.6] (s1) ++(0,15mm);
          draw [<-] (t-6) -- ++(0,15mm);
          % draw arrow between the helper coordinate s1 and the point that has the x-coordinate of t-6 and the y-coordinate of s1
          draw [<->] (s1) -- node[fill=white,font=scriptsize,inner sep=1pt] $s_i,j=?$ (t-6 |- s1);

          endtikzpicture

          enddocument






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited May 13 at 21:05

























          answered May 13 at 20:41









          Torbjørn T.Torbjørn T.

          160k13262451




          160k13262451







          • 2





            @naveganteX Well, you can use exactly the same techniques for that.

            – Torbjørn T.
            May 13 at 20:47






          • 1





            @naveganteX Basically to transpose the matrix you just have to do it by hand I think, i.e. rewrite it. And change styles/anchors etc. that refer to rows so they refer to columns, and vice versa.

            – Torbjørn T.
            May 13 at 21:00






          • 1





            @naveganteX Did a quick transpose, see updated answer. Might have gotten some things wrong though, but you'll probably be able to fix that, considering where you had gotten to in the first place.

            – Torbjørn T.
            May 13 at 21:06






          • 1





            @naveganteX Replace dashed with rounded corners.

            – Torbjørn T.
            May 13 at 21:21






          • 1





            @naveganteX You already know how to do that ... At least you had done it two places in your original code. font=small (or some other font size switch)

            – Torbjørn T.
            May 13 at 23:17












          • 2





            @naveganteX Well, you can use exactly the same techniques for that.

            – Torbjørn T.
            May 13 at 20:47






          • 1





            @naveganteX Basically to transpose the matrix you just have to do it by hand I think, i.e. rewrite it. And change styles/anchors etc. that refer to rows so they refer to columns, and vice versa.

            – Torbjørn T.
            May 13 at 21:00






          • 1





            @naveganteX Did a quick transpose, see updated answer. Might have gotten some things wrong though, but you'll probably be able to fix that, considering where you had gotten to in the first place.

            – Torbjørn T.
            May 13 at 21:06






          • 1





            @naveganteX Replace dashed with rounded corners.

            – Torbjørn T.
            May 13 at 21:21






          • 1





            @naveganteX You already know how to do that ... At least you had done it two places in your original code. font=small (or some other font size switch)

            – Torbjørn T.
            May 13 at 23:17







          2




          2





          @naveganteX Well, you can use exactly the same techniques for that.

          – Torbjørn T.
          May 13 at 20:47





          @naveganteX Well, you can use exactly the same techniques for that.

          – Torbjørn T.
          May 13 at 20:47




          1




          1





          @naveganteX Basically to transpose the matrix you just have to do it by hand I think, i.e. rewrite it. And change styles/anchors etc. that refer to rows so they refer to columns, and vice versa.

          – Torbjørn T.
          May 13 at 21:00





          @naveganteX Basically to transpose the matrix you just have to do it by hand I think, i.e. rewrite it. And change styles/anchors etc. that refer to rows so they refer to columns, and vice versa.

          – Torbjørn T.
          May 13 at 21:00




          1




          1





          @naveganteX Did a quick transpose, see updated answer. Might have gotten some things wrong though, but you'll probably be able to fix that, considering where you had gotten to in the first place.

          – Torbjørn T.
          May 13 at 21:06





          @naveganteX Did a quick transpose, see updated answer. Might have gotten some things wrong though, but you'll probably be able to fix that, considering where you had gotten to in the first place.

          – Torbjørn T.
          May 13 at 21:06




          1




          1





          @naveganteX Replace dashed with rounded corners.

          – Torbjørn T.
          May 13 at 21:21





          @naveganteX Replace dashed with rounded corners.

          – Torbjørn T.
          May 13 at 21:21




          1




          1





          @naveganteX You already know how to do that ... At least you had done it two places in your original code. font=small (or some other font size switch)

          – Torbjørn T.
          May 13 at 23:17





          @naveganteX You already know how to do that ... At least you had done it two places in your original code. font=small (or some other font size switch)

          – Torbjørn T.
          May 13 at 23:17











          4














          Very similar to Torbjørn T's nice answer except that the border of the comment is as in your figure (and drawn via path picture, i.e. you can make it a style if you use such things more often).



          documentclass[tikz,border=3.14mm]standalone
          usetikzlibrarymatrix,fit,positioning

          begindocument
          begintikzpicture
          matrix (A) [matrix of math nodes, nodes in empty cells,
          nodes=draw, minimum width=8mm, minimum height=5mm, outer sep=0pt,
          anchor=center,row sep=-pgflinewidth, column sep=-pgflinewidth,
          row 3/.style = nodes=minimum height=8mm,
          row 5/.style = nodes=minimum height=8mm,
          column 3/.style = nodes=minimum width=10mm,
          column 4/.style = nodes=fill=lightgray,
          column 6/.style = nodes=fill=lightgray,
          column 7/.style = nodes=minimum width=10mm,]
          R & & ;
          foreach i [count=xi] in 1,2,dots,$i$, ,$j$,dots,$m-1$,$m$
          node[above, font=scriptsize] at (A-1-xi.north) istrut;
          foreach i [count=xi] in 1,2,vdots,$u$,vdots,$n-1$,$n$
          node[left, font=scriptsize] at (A-xi-1.west) istrut;
          node[right=1cm of A,align=left,text width=4cm,path picture=
          draw ([xshift=1em,yshift=-pgflinewidth]path picture bounding box.north west) -] (txt)%
          Some very long text about ducks, koalas and marmots which is very long and deals
          with ducks, koalas and marmots. dots;
          foreach i in 2,4,7
          node[draw,rounded corners,fit=(A-i-4)(A-i-6),inner xsep=-1ex,
          inner ysep=-0.3ex] (F-i);
          draw[-latex] (txt) -- (F-i.east);


          endtikzpicture
          enddocument


          enter image description here






          share|improve this answer























          • The one! Thank you very much! Is there any way that you can transpose the matrix and draw the second model?

            – naveganteX
            May 13 at 20:58






          • 1





            @naveganteX AFAIK there is no automatic way, matrices are very immune to transformations. So one needs to do what Torbjørn T. is saying: transpose it by rewriting it. Any attempt to use transform canvas will extremely likely fail at a given point.

            – marmot
            May 13 at 21:06















          4














          Very similar to Torbjørn T's nice answer except that the border of the comment is as in your figure (and drawn via path picture, i.e. you can make it a style if you use such things more often).



          documentclass[tikz,border=3.14mm]standalone
          usetikzlibrarymatrix,fit,positioning

          begindocument
          begintikzpicture
          matrix (A) [matrix of math nodes, nodes in empty cells,
          nodes=draw, minimum width=8mm, minimum height=5mm, outer sep=0pt,
          anchor=center,row sep=-pgflinewidth, column sep=-pgflinewidth,
          row 3/.style = nodes=minimum height=8mm,
          row 5/.style = nodes=minimum height=8mm,
          column 3/.style = nodes=minimum width=10mm,
          column 4/.style = nodes=fill=lightgray,
          column 6/.style = nodes=fill=lightgray,
          column 7/.style = nodes=minimum width=10mm,]
          R & & ;
          foreach i [count=xi] in 1,2,dots,$i$, ,$j$,dots,$m-1$,$m$
          node[above, font=scriptsize] at (A-1-xi.north) istrut;
          foreach i [count=xi] in 1,2,vdots,$u$,vdots,$n-1$,$n$
          node[left, font=scriptsize] at (A-xi-1.west) istrut;
          node[right=1cm of A,align=left,text width=4cm,path picture=
          draw ([xshift=1em,yshift=-pgflinewidth]path picture bounding box.north west) -] (txt)%
          Some very long text about ducks, koalas and marmots which is very long and deals
          with ducks, koalas and marmots. dots;
          foreach i in 2,4,7
          node[draw,rounded corners,fit=(A-i-4)(A-i-6),inner xsep=-1ex,
          inner ysep=-0.3ex] (F-i);
          draw[-latex] (txt) -- (F-i.east);


          endtikzpicture
          enddocument


          enter image description here






          share|improve this answer























          • The one! Thank you very much! Is there any way that you can transpose the matrix and draw the second model?

            – naveganteX
            May 13 at 20:58






          • 1





            @naveganteX AFAIK there is no automatic way, matrices are very immune to transformations. So one needs to do what Torbjørn T. is saying: transpose it by rewriting it. Any attempt to use transform canvas will extremely likely fail at a given point.

            – marmot
            May 13 at 21:06













          4












          4








          4







          Very similar to Torbjørn T's nice answer except that the border of the comment is as in your figure (and drawn via path picture, i.e. you can make it a style if you use such things more often).



          documentclass[tikz,border=3.14mm]standalone
          usetikzlibrarymatrix,fit,positioning

          begindocument
          begintikzpicture
          matrix (A) [matrix of math nodes, nodes in empty cells,
          nodes=draw, minimum width=8mm, minimum height=5mm, outer sep=0pt,
          anchor=center,row sep=-pgflinewidth, column sep=-pgflinewidth,
          row 3/.style = nodes=minimum height=8mm,
          row 5/.style = nodes=minimum height=8mm,
          column 3/.style = nodes=minimum width=10mm,
          column 4/.style = nodes=fill=lightgray,
          column 6/.style = nodes=fill=lightgray,
          column 7/.style = nodes=minimum width=10mm,]
          R & & ;
          foreach i [count=xi] in 1,2,dots,$i$, ,$j$,dots,$m-1$,$m$
          node[above, font=scriptsize] at (A-1-xi.north) istrut;
          foreach i [count=xi] in 1,2,vdots,$u$,vdots,$n-1$,$n$
          node[left, font=scriptsize] at (A-xi-1.west) istrut;
          node[right=1cm of A,align=left,text width=4cm,path picture=
          draw ([xshift=1em,yshift=-pgflinewidth]path picture bounding box.north west) -] (txt)%
          Some very long text about ducks, koalas and marmots which is very long and deals
          with ducks, koalas and marmots. dots;
          foreach i in 2,4,7
          node[draw,rounded corners,fit=(A-i-4)(A-i-6),inner xsep=-1ex,
          inner ysep=-0.3ex] (F-i);
          draw[-latex] (txt) -- (F-i.east);


          endtikzpicture
          enddocument


          enter image description here






          share|improve this answer













          Very similar to Torbjørn T's nice answer except that the border of the comment is as in your figure (and drawn via path picture, i.e. you can make it a style if you use such things more often).



          documentclass[tikz,border=3.14mm]standalone
          usetikzlibrarymatrix,fit,positioning

          begindocument
          begintikzpicture
          matrix (A) [matrix of math nodes, nodes in empty cells,
          nodes=draw, minimum width=8mm, minimum height=5mm, outer sep=0pt,
          anchor=center,row sep=-pgflinewidth, column sep=-pgflinewidth,
          row 3/.style = nodes=minimum height=8mm,
          row 5/.style = nodes=minimum height=8mm,
          column 3/.style = nodes=minimum width=10mm,
          column 4/.style = nodes=fill=lightgray,
          column 6/.style = nodes=fill=lightgray,
          column 7/.style = nodes=minimum width=10mm,]
          R & & ;
          foreach i [count=xi] in 1,2,dots,$i$, ,$j$,dots,$m-1$,$m$
          node[above, font=scriptsize] at (A-1-xi.north) istrut;
          foreach i [count=xi] in 1,2,vdots,$u$,vdots,$n-1$,$n$
          node[left, font=scriptsize] at (A-xi-1.west) istrut;
          node[right=1cm of A,align=left,text width=4cm,path picture=
          draw ([xshift=1em,yshift=-pgflinewidth]path picture bounding box.north west) -] (txt)%
          Some very long text about ducks, koalas and marmots which is very long and deals
          with ducks, koalas and marmots. dots;
          foreach i in 2,4,7
          node[draw,rounded corners,fit=(A-i-4)(A-i-6),inner xsep=-1ex,
          inner ysep=-0.3ex] (F-i);
          draw[-latex] (txt) -- (F-i.east);


          endtikzpicture
          enddocument


          enter image description here







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered May 13 at 20:55









          marmotmarmot

          130k6164312




          130k6164312












          • The one! Thank you very much! Is there any way that you can transpose the matrix and draw the second model?

            – naveganteX
            May 13 at 20:58






          • 1





            @naveganteX AFAIK there is no automatic way, matrices are very immune to transformations. So one needs to do what Torbjørn T. is saying: transpose it by rewriting it. Any attempt to use transform canvas will extremely likely fail at a given point.

            – marmot
            May 13 at 21:06

















          • The one! Thank you very much! Is there any way that you can transpose the matrix and draw the second model?

            – naveganteX
            May 13 at 20:58






          • 1





            @naveganteX AFAIK there is no automatic way, matrices are very immune to transformations. So one needs to do what Torbjørn T. is saying: transpose it by rewriting it. Any attempt to use transform canvas will extremely likely fail at a given point.

            – marmot
            May 13 at 21:06
















          The one! Thank you very much! Is there any way that you can transpose the matrix and draw the second model?

          – naveganteX
          May 13 at 20:58





          The one! Thank you very much! Is there any way that you can transpose the matrix and draw the second model?

          – naveganteX
          May 13 at 20:58




          1




          1





          @naveganteX AFAIK there is no automatic way, matrices are very immune to transformations. So one needs to do what Torbjørn T. is saying: transpose it by rewriting it. Any attempt to use transform canvas will extremely likely fail at a given point.

          – marmot
          May 13 at 21:06





          @naveganteX AFAIK there is no automatic way, matrices are very immune to transformations. So one needs to do what Torbjørn T. is saying: transpose it by rewriting it. Any attempt to use transform canvas will extremely likely fail at a given point.

          – marmot
          May 13 at 21:06

















          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%2f490705%2fadding-labels-and-comments-to-a-matrix%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

          Club Baloncesto Breogán Índice Historia | Pavillón | Nome | O Breogán na cultura popular | Xogadores | Adestradores | Presidentes | Palmarés | Historial | Líderes | Notas | Véxase tamén | Menú de navegacióncbbreogan.galCadroGuía oficial da ACB 2009-10, páxina 201Guía oficial ACB 1992, páxina 183. Editorial DB.É de 6.500 espectadores sentados axeitándose á última normativa"Estudiantes Junior, entre as mellores canteiras"o orixinalHemeroteca El Mundo Deportivo, 16 setembro de 1970, páxina 12Historia do BreogánAlfredo Pérez, o último canoneiroHistoria C.B. BreogánHemeroteca de El Mundo DeportivoJimmy Wright, norteamericano do Breogán deixará Lugo por ameazas de morteResultados de Breogán en 1986-87Resultados de Breogán en 1990-91Ficha de Velimir Perasović en acb.comResultados de Breogán en 1994-95Breogán arrasa al Barça. "El Mundo Deportivo", 27 de setembro de 1999, páxina 58CB Breogán - FC BarcelonaA FEB invita a participar nunha nova Liga EuropeaCharlie Bell na prensa estatalMáximos anotadores 2005Tempada 2005-06 : Tódolos Xogadores da Xornada""Non quero pensar nunha man negra, mais pregúntome que está a pasar""o orixinalRaúl López, orgulloso dos xogadores, presume da boa saúde económica do BreogánJulio González confirma que cesa como presidente del BreogánHomenaxe a Lisardo GómezA tempada do rexurdimento celesteEntrevista a Lisardo GómezEl COB dinamita el Pazo para forzar el quinto (69-73)Cafés Candelas, patrocinador del CB Breogán"Suso Lázare, novo presidente do Breogán"o orixinalCafés Candelas Breogán firma el mayor triunfo de la historiaEl Breogán realizará 17 homenajes por su cincuenta aniversario"O Breogán honra ao seu fundador e primeiro presidente"o orixinalMiguel Giao recibiu a homenaxe do PazoHomenaxe aos primeiros gladiadores celestesO home que nos amosa como ver o Breo co corazónTita Franco será homenaxeada polos #50anosdeBreoJulio Vila recibirá unha homenaxe in memoriam polos #50anosdeBreo"O Breogán homenaxeará aos seus aboados máis veteráns"Pechada ovación a «Capi» Sanmartín e Ricardo «Corazón de González»Homenaxe por décadas de informaciónPaco García volve ao Pazo con motivo do 50 aniversario"Resultados y clasificaciones""O Cafés Candelas Breogán, campión da Copa Princesa""O Cafés Candelas Breogán, equipo ACB"C.B. Breogán"Proxecto social"o orixinal"Centros asociados"o orixinalFicha en imdb.comMario Camus trata la recuperación del amor en 'La vieja música', su última película"Páxina web oficial""Club Baloncesto Breogán""C. B. Breogán S.A.D."eehttp://www.fegaba.com

          Vilaño, A Laracha Índice Patrimonio | Lugares e parroquias | Véxase tamén | Menú de navegación43°14′52″N 8°36′03″O / 43.24775, -8.60070

          Cegueira Índice Epidemioloxía | Deficiencia visual | Tipos de cegueira | Principais causas de cegueira | Tratamento | Técnicas de adaptación e axudas | Vida dos cegos | Primeiros auxilios | Crenzas respecto das persoas cegas | Crenzas das persoas cegas | O neno deficiente visual | Aspectos psicolóxicos da cegueira | Notas | Véxase tamén | Menú de navegación54.054.154.436928256blindnessDicionario da Real Academia GalegaPortal das Palabras"International Standards: Visual Standards — Aspects and Ranges of Vision Loss with Emphasis on Population Surveys.""Visual impairment and blindness""Presentan un plan para previr a cegueira"o orixinalACCDV Associació Catalana de Cecs i Disminuïts Visuals - PMFTrachoma"Effect of gene therapy on visual function in Leber's congenital amaurosis"1844137110.1056/NEJMoa0802268Cans guía - os mellores amigos dos cegosArquivadoEscola de cans guía para cegos en Mortágua, PortugalArquivado"Tecnología para ciegos y deficientes visuales. Recopilación de recursos gratuitos en la Red""Colorino""‘COL.diesis’, escuchar los sonidos del color""COL.diesis: Transforming Colour into Melody and Implementing the Result in a Colour Sensor Device"o orixinal"Sistema de desarrollo de sinestesia color-sonido para invidentes utilizando un protocolo de audio""Enseñanza táctil - geometría y color. Juegos didácticos para niños ciegos y videntes""Sistema Constanz"L'ocupació laboral dels cecs a l'Estat espanyol està pràcticament equiparada a la de les persones amb visió, entrevista amb Pedro ZuritaONCE (Organización Nacional de Cegos de España)Prevención da cegueiraDescrición de deficiencias visuais (Disc@pnet)Braillín, un boneco atractivo para calquera neno, con ou sen discapacidade, que permite familiarizarse co sistema de escritura e lectura brailleAxudas Técnicas36838ID00897494007150-90057129528256DOID:1432HP:0000618D001766C10.597.751.941.162C97109C0155020