Wants to add text to a following rectangle. Also wants draw an another rectangle on the right side of the following rectangle sharing the boundary.
\documentclass[10pt,journal,compsoc]{IEEEtran}
\usepackage{pgfplots}
\usepackage{subfig}
\usepackage{tcolorbox}
\usetikzlibrary{positioning,shapes,arrows,shadows,patterns,calc}
\hyphenation{op-tical net-works semi-conduc-tor}
\begin{document}
\begin{figure}
%\centering
% \captionsetup{justification = centering}
\begin{tikzpicture}[x=0.5mm,y=0.5mm]
\coordinate (a1);
\coordinate[right=150 of a1](a2);
\coordinate[below=90 of a1](a3);
\coordinate[right=150 of a3](a4);
\draw[ultra thick,rounded corners=10,green] ($(a4)-(80,20)$)
rectangle +(80*2,20*2);%Rectangle rounded
\end{tikzpicture}
\end{figure}
Best Answer
Adaptations:
tikz
).node{\Large text}
right afterrectangle
to add text centered or just use nodes as follows ...)node
to draw the rectangular nodes with text, so you don't need to calculate any coordinates.minimum width=160, minimum height=40
to the desired size.right=0 of a
.Code:
Result: