Drawing simple edge, no arrow
There is no arrow with edge
by default, but you have turned on arrows for all lines in the tikzpicture
with the ->
argument:
\begin{tikzpicture}[->,auto,node distance=3cm,
thick,main node/.style={draw,font=\bfseries}]
Remove ->
and there are no arrows.
Or as commented by Jake, use -
as an argument to the \path
(or edge
) to remove the arrows locally.
\path[-]
(111) edge (112)
edge (122)
edge (1n2)
(121) edge (112)
edge (122)
edge (1n2)
(1n1) edge (112)
edge (122)
edge (1n2)
(121) edge[dashed] (1n1);
You could also put the \path
drawing the lines in a scope
environment and use the same argument. Could be convenient if you had several \path
/\draw
commands for which you wanted to apply this.
\begin{scope}[-]
\path
(111) edge (112)
edge (122)
edge (1n2)
(121) edge (112)
edge (122)
edge (1n2)
(1n1) edge (112)
edge (122)
edge (1n2)
(121) edge[dashed] (1n1);
\end{scope}
It's also beneficial to use matrix
nodes to reduce the typing labor. I used to a small Excel file to strip down the node names and to populate the matrix.
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{matrix}
\begin{document}
\begin{tikzpicture}
\matrix[matrix of math nodes, nodes={draw,font=\bfseries},row sep ={1cm,between origins},column sep={2cm,between origins}] (m) {
X_{n,n}^{(1)} &[0.5cm] X_{n,n}^{(2)} &[2cm] X_{n,n}^{(k)} &[1cm] X_{n,n}^{(n-2)} &[0.5cm] X_{n,n}^{(n-1)}\\[1cm]
X_{n,2}^{(1)} & X_{n,2}^{(2)} & X_{n,2}^{(k)} & X_{n,2}^{(n-2)} & X_{n,2}^{(n-1)}\\
X_{n,1}^{(1)} & X_{n,1}^{(2)} & X_{n,1}^{(k)} & X_{n,1}^{(n-2)} & X_{n,1}^{(n-1)}\\[1cm]
X_{2,n}^{(1)} & X_{2,n}^{(2)} & X_{2,n}^{(k)} & X_{2,n}^{(n-2)} & X_{2,n}^{(n-1)}\\[1cm]
X_{2,2}^{(1)} & X_{2,2}^{(2)} & X_{2,2}^{(k)} & X_{2,2}^{(n-2)} & X_{2,2}^{(n-1)}\\
X_{2,1}^{(1)} & X_{2,1}^{(2)} & X_{2,1}^{(k)} & X_{2,1}^{(n-2)} & X_{2,1}^{(n-1)}\\[1cm]
X_{1,n}^{(1)} & X_{1,n}^{(2)} & X_{1,n}^{(k)} & X_{1,n}^{(n-2)} & X_{1,n}^{(n-1)}\\[1cm]
X_{1,2}^{(1)} & X_{1,2}^{(2)} & X_{1,2}^{(k)} & X_{1,2}^{(n-2)} & X_{1,2}^{(n-1)}\\
X_{1,1}^{(1)} & X_{1,1}^{(2)} & X_{1,1}^{(k)} & X_{1,1}^{(n-2)} & X_{1,1}^{(n-1)}\\
};
\path[thick]
(m-7-1) edge (m-7-2)
edge (m-8-2)
edge (m-9-2)
(m-8-1) edge (m-7-2)
edge (m-8-2)
edge (m-9-2)
(m-9-1) edge (m-7-2)
edge (m-8-2)
edge (m-9-2)
(m-7-1) edge[-,dashed] (m-8-1);
\end{tikzpicture}
\end{document}