How can I get a side caption for a Tikz drawing?
If I try with SCfigure my drawing overlaps with the caption.
Here is the immage I drew using SCfigure:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usepackage{graphicx}
\usepackage{sidecap}
\begin{document}
\begin{SCfigure} [b]
\centering
\begin{tikzpicture}[scale=0.5]
\draw (-1,-3) -- (-1,3) -- (-0.7,3) -- (-0.7, -3) -- cycle;
\draw (1,3) -- (1,-3) -- (0.7,-3) -- (0.7, 3) -- cycle;
\fill[black!15] (1,3) -- (1,-3) -- (0.7,-3) -- (0.7, 3) -- cycle;
\fill[black!15] (-1,-3) -- (-1,3) -- (-0.7,3) -- (-0.7, -3) -- cycle;
\draw [<->] (-0.68,0) --(0.68,0);
\draw (0,0) node[anchor=north] {$h$};
\draw [<-] (1.01,-0.5) --(2.8,-0.5);
\draw (1.9,-0.5) node[anchor=north] {\small{K}};
\draw (1.75,0.5) circle (0.7);
\draw (2.2,2.5) circle (0.7);
\draw (-2,1.7) circle (0.7);
\draw (-1.75,0) circle (0.7);
\draw (-2.3,-1.6) circle (0.7);
\draw (2,-1.98) circle (0.7);
\draw [<->] (2.69,-1.98) --(1.31,-1.98);
\draw (2,-1.98) node[anchor=north] {$\sigma$};
\end{tikzpicture}
\caption{I would love to have this caption on the left of my drawing :}
\label{entropic1}
\end{SCfigure}
\end{document}
[scale=0.5]
to the appropiate factor, and avoid the use of absolute units such as thecm
you used in the circles. – JLDiaz Feb 20 '18 at 9:59SCfigure
, there is no overlap when I try it here. Your diagram is certainly not so wide that you don't have room for the caption next to it, so resizing shouldn't be necessary. – Torbjørn T. Feb 20 '18 at 10:30