1

I have a maybe really dumb question. I am using a matrix of nodes where I specify a 'minimum height' for all nodes globally (1.5 cm)

However, when I now want to set the node height of row 6 to a lower value (1cm), this is ignored.

As far as I know I have the following option for specifiyng the properties of a node:

  • text width ==> width of the node
  • minimum height ==> (minimum)height of the node

Using something like text height makes the content of the nodes shift ugly. Isn't there some easy way to specify the exact height of the node and not just the minimum value?

Bernard
  • 271,350
SRel
  • 1,313
  • 4
    please show us an example what you doing. the best in form of complete small document with your matrix which we can copy and test and in it show you what you should do. btw, properties particular row, for example row x, you can change wit row x/,style = {...}. – Zarko Sep 17 '18 at 11:20

1 Answers1

3

I don't see the problem;

\documentclass[tikz]{standalone}
\usetikzlibrary{matrix}

\begin{document}
\begin{tikzpicture}
\matrix (A) [matrix of nodes,
    nodes in empty cells,
    column sep=1mm, row sep=1mm,
    nodes={draw, minimum height=1.5cm, anchor=center},
    row 2/.style={
        nodes={minimum height=1cm}}
        ]
{ & & \\ & & \\};
\end{tikzpicture}
\end{document}

enter image description here

Ignasi
  • 136,588
  • okay your seems to work, I don't know where is the problem then in my case. my code looks nearly th same – SRel Sep 17 '18 at 11:27
  • 1
    @SRel, really? how we can now this? please. be so kind and show us your code! – Zarko Sep 17 '18 at 11:42
  • @zarko oh I see my mistake looking here: https://tex.stackexchange.com/questions/24305/some-problems-drawing-linked-lists-with-tikzs-matrix-library I just said row 2/.style={minimum height=1cm} instead of
    row 2/.style={nodes={minimum height=1cm}}
    – SRel Sep 17 '18 at 16:10