Created
March 23, 2017 09:49
-
-
Save dfbarrero/0b198bc7e57dd99b88eef0a0cc564f11 to your computer and use it in GitHub Desktop.
Matrix figure with LaTeX/Tikz
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| \begin{tikzpicture}[draw, minimum width=1cm, minimum height=0.5cm] | |
| \node[draw] (in) at (-1,2) {}; | |
| \node[draw] (out) at (1,2) {}; | |
| \matrix (queue)[matrix of nodes, nodes={draw, nodes={draw}}, nodes in empty cells] | |
| { | |
| \\ \\ \\ \\ | |
| }; | |
| \draw[-latex] (0.25,1) .. controls (0.25,1.5) and (1,1.5) .. (out.south); | |
| \draw[-latex] (in.south) .. controls (-1, 1.5) and (-0.25,1.5) .. (-0.25,1); | |
| \end{tikzpicture} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi! I got the helpful code I needed from your https://atc1.aut.uah.es/~david/notes/2017/03/datastructures-in-tikz/ post, but I caught an error you might like to know about--it looks like you saved your "stack" example over your "matrix" example and then linked both to
.../matrix.tex.As I mentioned, I'm covered (thank you for posting!), I'm just letting you know.
Cheers,
Robert