Questions tagged [tikz-matrix]

{tikz-matrix} concerns matrix nodes particularly in the tikz-matrix library of tikz-pgf.

Filter by
Sorted by
Tagged with
3
votes
2answers
387 views

Split a matrix block in TikZ into two blocks, is possible or better way to do this diagram?

\documentclass{article} \usepackage{tikz,varwidth,amsmath} \usetikzlibrary{calc,fit,matrix,arrows,automata,positioning,decorations.pathmorphing} \begin{document} \tikzstyle{block} = [draw, ...
1
vote
1answer
165 views

Problem on matrix of nodes with complex nodes

I've defined a node style which contains a path picture consisting into an inner node: cross/.style={circle, minimum size=1cm, draw=black!70, fill=white, path picture={% \node[cross ...
5
votes
1answer
305 views

With TikZ, how do I use a matrix to position verticies of a graph?

How do I use the matrix library to position the vertices of a graph? In the manual, it says to use the matrix library if I need advanced alignment of vertices while using the graph library, but it ...
1
vote
1answer
564 views

Fitting text in the node, for neural network

I am trying to make a neural network with some text inside the nodes in the hidden layer. My code is here which is a modified version of one I found on tex stackexchange: \begin{tikzpicture}[ plain/....
2
votes
3answers
77 views

Code generated by \xappto is not usable when generated from within \foreach

The objective is to generate rows of a TikZ matrix from a string. In the example below, \drawpodpair{NAME:TYPE}{SCOPE} produces a matrix row. I want to call \foreach over a string of the form N1:T1,...
3
votes
3answers
234 views

TikZ: matrix in a matrix gives “missing $”

The following TikZ code compiles and renders as expected: \matrix[struct] { \node[varname] (age) {age}; & \node[vartype] {int*}; \\ \node[varname] {height}; & \node[vartype] {float}; \...
2
votes
2answers
167 views

TikZ: explicitly-named node in a matrix offers anchors in the wrong place

I have put \node commands inside a TikZ matrix of nodes. I am aware that this breaks automatic m-1-1 node naming, but when I give the name of a node explicitly, the anchors are in the wrong place. ...
2
votes
0answers
666 views

tensor math graphic

Is there any good packages for creating a graphic similar to this: in order to display how tensor math is working to a less mathematically skilled audience? It would be nice to have the tensor math ...
2
votes
1answer
876 views

Simpler solution of “Table cell color overlaps cell border”?

I have seen many discussions about "Table cell color overlaps cell border". I want to share my try on this problem. Also, I am a beginner in latex, my code may not be the best, I would like to see if ...
3
votes
1answer
270 views

tikz matrix alignment of empty cells [duplicate]

Please consider: \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{matrix} \begin{document} \begin{tikzpicture}[ ] \matrix (m) [nodes in empty cells, matrix of ...
2
votes
2answers
140 views

matrix problem in tikz

Can anyone explain why this simple table comes out skewed? \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{matrix} \begin{document} \begin{tikzpicture}[ ] \matrix (m) [matrix ...
4
votes
2answers
338 views

Automating tikzpicture to reproduce a matrix-like image

There's this image I want to reproduce using tikz My main issue is the right one since I want to take advantage tikz's automatic stuff for drawing. As of now, this MWE is my best attempt: \...
1
vote
2answers
572 views

Remove left/right margin of a TiKZ Matrix

Consider the MWE below. This produces a matrix with 2 overlapping rows (that is what I want), however, it is also creating extra whitespace on the left and right side (which I made red in the ...
4
votes
1answer
187 views

Shading entries in Hilbert-matrix in TikZ-matrix

I am trying to display a Hilbert-matrix and to color the antidiagonals by varying colors choosen from an array, so that cell (i,j) gets color \Colors[i+j-1 mod 3] (so in order that nearby cells with ...
1
vote
1answer
491 views

Typesetting a band diagonal matrix [duplicate]

Is there a way to typeset the following matrix in LaTeX? In my attempt, I got to the following: \begin{equation} C=\left[\begin{array}{cccccccccc} 1 & 1 & 1 & 0 & \ldots & \...
0
votes
1answer
105 views

How can I draw this shape: [duplicate]

I want to draw this matrix but I can't.
5
votes
2answers
352 views

How to make TikZ matrix start a new row automatically when certain column number is reached?

I wish to set the maximum column count in a TikZ matrix and, if I start a new cell when the maximum count is reached, LaTeX would put the cell in a new row. One approach would be a command which ...
2
votes
2answers
112 views

Is there a way of choosing the element of a matrix to write again?

Imagine you have a matrix defined as: \matrix(nums)[matrix of nodes] { 1 & 2 \\ 3 & 4 \\ 5 & 6\\ }; and you want to use what's written in node 1-...
4
votes
1answer
546 views

Limiting the scope of styles in TikZ matrix of nodes

Suppose I want to have a different format for the first column of a matrix of nodes compared to the rest of the nodes in the matrix. Using the column 1/.style=mycol I can assign a style to that column,...
4
votes
1answer
269 views

TikZ Matrix Figure, Hiding Nodes, and Formatting Issues

I'm trying to show the evolution of a cube-like structure when certain nodes are removed. Here is my initial diagram: \documentclass[12pt,tikz]{standalone} % AMS Math Packages \usepackage{amsmath} \...
1
vote
1answer
245 views

Origination and destination of lines in TikZ matrix with chains

I'm trying to visualise a Markov chain and after some research used a matrix with chains. This works quite will, but I can't get to originate and terminate the lines where I want them. Here my code, ...
2
votes
0answers
183 views

Redefining \tikzset inside a TikZ matrix

I was playing around with the results from this question and I found a behaviour I don't fully understand. Consider the following MWE: \input tikz \usetikzlibrary{matrix} \let\oldset\tikzset \def\...
3
votes
1answer
142 views

How do I complete this rewriting of TikZ matrix of nodes parser?

This is a followup to a previous question. I'm trying to hack the cell parsing of \matrix so that at some point in my code I can hold and manipulate the whole cell content to decide how to render it. ...
2
votes
1answer
434 views

Tikz matrix with multiple styles not working

I have a Tikz picture that contains a matrix. I would like to center the header text and highlight some specific cells. It is important that it is a matrix and not a tabular. I have tried the ...
8
votes
4answers
983 views

TikZ matrix delimiters are too big

I want to make a matrix with TikZ so I can put some fancy colored boxes around some elements, but I'm running into a problem: the parentheses around the matrix are too big and too far apart from the ...
3
votes
1answer
114 views

How to create parallel diagonals in a table cell?

How to create the following pattern of parallel diagonals in the table?
2
votes
1answer
996 views

absolute position of tikzpicture in beamer

I'm working on a tikz picture, and failed to vertical align tikz pictures in one beamer frame. I did many google search and finally found it may be to do with inner sep of matrix. Is is possible to ...
2
votes
2answers
384 views

L shaped boxes in tikz matrix

I am using tikz matrix to generate shapes of shaded cells. I have the following code working to generates the shape I am looking for in this example. It is just a matrix with some defined fills and ...
3
votes
1answer
536 views

Tikz Matrix: get boxes with the same size and text vertically centered

I want to draw a certain process/flow/block diagram. So I used this TiKZ Galery example as starter: Using this approach I came up with the MWE below: Now this does not look nice for a flow diagram. ...
2
votes
3answers
348 views

Position two matrices vertically

I want to show two 12x12 matrices side by side. This is a transition, so there should be an arrow in the middle between them. I have to use tikz, because i want to highlight the one entry that changed ...
1
vote
1answer
210 views

How to produce this Aufbau/Hund diagram in LaTeX?

How to produce this Aufbau/Hund diagram in LaTeX? I would prefer Chemfig, but TikZ seems a better fit.
4
votes
1answer
183 views

Problem with the size of arrows (in tikz matrix)

I'm using tikz to make an array with arrows connecting different cells in order to explain how to get one cell using the others. The problem is that the arrows are far to small to be visible. I also ...
4
votes
0answers
77 views

Labeling custom path in TikZ [duplicate]

MWE: \documentclass[12pt]{article} \usepackage{tikz} \usetikzlibrary{arrows.meta, graphs, matrix, quotes} \usepackage{fancyhdr} \pagestyle{empty} \begin{document} \begin{tikzpicture} \matrix[...
5
votes
1answer
167 views

How to add arrows going from a matrix to column vectors?

If possible, I would like to know how to do this. Thank you. Here is my code: \documentclass[11pt]{memoir} \usepackage{tikz} %%% GRAPHIQUE \newcommand{\largeto}{\mbox{\LARGE${}\to{}$}} \title{...
2
votes
1answer
91 views

Matrices of nodes in Tikz alike to the ones in the amsmath package

I'm trying to work with matrices in Tikz. Specífically I would like to follow the amsmath package but I'm having a really hard time dealing with the overlay - remember picture thing. Here is the ...
1
vote
0answers
492 views

'Package pgf Error: No shape named is known' for nodes defined in matrix [closed]

On my local system \graph is not able to recognize nodes defined \matrix \documentclass{article} % say \usepackage{tikz} \usetikzlibrary{calc,intersections,through,backgrounds} \usetikzlibrary{...
3
votes
1answer
141 views

Weird cell placement in a tikz matrix

The code \documentclass{minimal} \usepackage{tikz} \usetikzlibrary{matrix} \begin{document} \begin{tikzpicture} \matrix[matrix of math nodes, column sep = {1.5cm,between origins}, row sep = 1cm] { ...
1
vote
1answer
394 views

Problem with tikz image in beamer.

I really hope you guys can help me out here. I have a tikz picture which is working mighty fine in the standard article mode using the following packages/libraries: \usepackage{tikz} \usetikzlibrary{...
6
votes
3answers
747 views

What is the best way to create this kind of binary matrix?

Like the fig 2. on page 3 of Relations in Mathematical Morphology with applications to Graphs and Rough Sets, John G. Stell Thank you!
2
votes
1answer
267 views

Tikz matrix inside foreach

I want to draw a matrix inside foreach but the compiling is aborted due to some errors. This is my code: \documentclass{scrartcl} \usepackage{tikz} \begin{document} \begin{tikzpicture} \foreach \x in ...
0
votes
1answer
138 views

Matrix node inside foreach loop give error when multiple columns

This question is different from \foreach inside \matrix questions 1 and 2. I was trying to do this question 3dmatrix. The \matrix command, when put inside \foreach gives the following error when ...
7
votes
2answers
4k views

Simple visualization of 3D matrix

I need to visualize 3D matrix in a way similar to this one: There are no arrows needed, I only want to have all 2D arrays fully visible, one "behind" each other and their corners connected by lines. ...
1
vote
1answer
160 views

Automated matrix of tables with TikZ

I'm working on this code \documentclass[a4paper]{standalone} \usepackage{amssymb,tikz} \usetikzlibrary{positioning, calc} \begin{document} \newcounter{compteur} \setcounter{compteur}{1} \newcounter{...
8
votes
1answer
531 views

Add matrix name inside tikzpicture

I have this matrix and I would like to name it. I have to enter H = in the begining of the matrix but I cant. I tried with \begin{bmatrix} but I can't circle with TikZ. \begin{equation*} \begin{...
0
votes
0answers
57 views

Issue referencing TikZ matrix nodes [duplicate]

In one of my documents I used the following template to illustrate a matrix multiplication but nowadays I get the error that shapes like A-2-1 are unknown. This is a known issue described in various ...
2
votes
1answer
559 views

Right options to draw a matrix of rectangles

Considering the following TeX code: \documentclass{beamer} \usepackage{tikz} \usetikzlibrary{matrix} \begin{document} \begin{frame} \begin{tikzpicture} \matrix (mat) at (7,-4) [matrix of ...
1
vote
0answers
53 views

Divide a matrix into two regions in latex by line and color [duplicate]

I have a matrix whose elements belong to two different classes, and I need to distinguish them by color. Something like this figure: Any tutorial or instruction?
0
votes
1answer
528 views

Color two columns separately in a matrix

From the solution code found here, I wanted to be able to also have a colored box around the x4 column like this: I also looked at the solution posted here that gives different colors in rows/columns,...
2
votes
2answers
42 views

Implicite addressing of inner matrix nodes doesn't work here

Addressing the nodes inside of this matrix implicite doesn't work here. I don't want to name them explicte. \documentclass{standalone} \usepackage{xltxtra} \usepackage{tikz} \usetikzlibrary{matrix,...
6
votes
1answer
1k views

How to highlight elements of a matrix in a formula? [duplicate]

I currently have problems with hihglighting elements inside a matrix. I've red a lot of questions here, my problem is that I have a matrix formula, {N}=[AB]{E} where I would like to highlight parts ...

1 2 3
4
5
7