[Tex/LaTex] How to increase the padding around nodes in a fitted box

fittikz-pgftikz-styles

I have code:

\documentclass[tikz,border=10pt]{standalone}
\usepackage{verbatim}
\usepackage{textcomp}
\usetikzlibrary{shapes,arrows,fit}
\begin{document}

\tikzset{
  sum/.style      = {draw, circle, node distance = 2cm, minimum size=.9cm}, % Adder
}

\newcommand{\suma}{\Large$+$}

\begin{tikzpicture}[auto, thick, node distance=2cm, >=triangle 45]
\draw
    node at (1,-3) [sum] (C) {\large$C$}
    node [sum, right of=C] (theta) {\large$\theta$}
    ;
    \draw[->](C) -- node {} (theta);

    \node[draw,fit=(C) (theta)] {$N_d$};

\end{tikzpicture}
\end{document}

My main question is how to increase the padding of the box around the nodes C and theta. As a bonus, I'd like to move the label $N_d$ to the bottom right of the box.

Best Answer

The inner sep key for the surrounding node is probably what you're after. To move the label, the easiest is to make a new node, placed relative to the surrounding node.

enter image description here

\documentclass[tikz,border=10pt]{standalone}
\usetikzlibrary{shapes,arrows,fit}
\begin{document}

\tikzset{
  sum/.style      = {draw, circle, node distance = 2cm, minimum size=.9cm}, % Adder
}

\begin{tikzpicture}[auto, thick, node distance=2cm, >=triangle 45]
\node at (1,-3) [sum] (C) {\large$C$};
\node [sum, right of=C] (theta) {\large$\theta$};

\draw[->](C) -- node {} (theta);

\node[inner sep=10pt,draw,fit=(C) (theta)] (box) {};
\node[above left] at (box.south east) {$N_d$};

\end{tikzpicture}
\end{document}