Could anyone please tell me how do I draw a rectangular shape with a black border around it?
I want that for all my rectangles in the following TikZ picture:
\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}[every node/.style = {shape = rectangle,
rounded corners,
fill = black!30!white,
minimum width = 3cm,
minimum height = 1.5cm,
align = center,
text = black},
black edge/.style = { -,
ultra thick,
black,
shorten >= 2pt}]
% the nodes : possible \newcommand*\dx{5} \newcommand*\dy{2}
\node(0;0) at (5,0) {Patients};
\node(1;1) at (10, 2) {Treatment $A_1$};
\node(1;-1) at (10,-2) {Treatment $A_2$};
\foreach \j in {-1,1}
{ \draw[black edge] (0;0.east) -- (1;\j.west); }
\end{tikzpicture}
\end{document}
draw= black
in theevery node
style.(a,b) rectangle (c,d)
draw
(ordraw=black
) what you needed and wanted? Or do you actually want to draw two lines as in the answers below?draw
just draws the border of a shape (here: a rectangular with rounded corners) and works for every node shape. Or do you want to draw a rectangle wit the path operator somewhere around the nodes?