Título de tikzpicture y modificar el espacio vertical.

Título de tikzpicture y modificar el espacio vertical.

Título de tikzpicture colocado en una posición incorrecta (ver imagen)

Mi código es:

\documentclass[8pt]{article}
\usepackage{caption}
\usepackage{pgfplots}
\usepackage{translator, tikz, array}
\usepackage{tikzsymbols}
\usepackage{float}                                      
\usepackage{graphicx}
\usetikzlibrary{arrows,shapes.geometric,positioning}
\begin{document}
Example caption of Tikzpicture:
\begin{figure}
\begin{center}
\begin{tikzpicture}[remember picture,overlay]
\node[anchor=north west,inner sep=0,xshift=6.0cm,yshift=0cm]
[circle,draw, very thick, color=red, minimum size=5.0cm, fill overzoom image=example-image-a]{};
\end{tikzpicture}
\captionof*{figure}{ABC}
\end{center}
\end{figure}
\end{document}

ingrese la descripción de la imagen aquí

¿Cómo puedo poner un título debajo de tikzpicture y cambiar el espacio vertical entre título/tikzpicture? Gracias de antemano

Respuesta1

  1. Ver¿Cuándo deberíamos usar \begin{center} en lugar de \centering?
  2. la opción overlayse usa para escribir "algo" sobre "algo más" y no considerar la dimensión de "algo", es como si "algo" no tuviera dimensión, no tienes que usarla para una imagen común y corriente.
  3. fill overzoom imagees una opción de tcolorbox, necesitas cargarla
  4. si está en un figureentorno que no necesita \captionof, utilícelo \captionen su lugar.

\documentclass[8pt]{article}
\usepackage{caption}
\usepackage{tikz}
\usepackage{graphicx}
\usepackage[many]{tcolorbox}

\begin{document}
Example caption of Tikzpicture:
\begin{figure}
\centering
\begin{tikzpicture}
\node[circle, draw, very thick, color=red, minimum size=5.0cm, fill overzoom image=example-image-a] {};
\end{tikzpicture}
\caption{ABC}
\end{figure}
\end{document}

ingrese la descripción de la imagen aquí

Editar:No me queda muy claro qué quieres lograr, pero si quieres mover la imagen horizontalmenteysu título, use un minipage, como aquí:

\documentclass[8pt]{article}
\usepackage{caption}
\usepackage{tikz}
\usepackage{graphicx}
\usepackage[many]{tcolorbox}

\begin{document}
In Fig.~\ref{fig:left} the image and its caption are on the left.
\begin{figure}[htb]
\begin{minipage}{.42\linewidth}
\centering
\begin{tikzpicture}
\node[circle, draw, very thick, color=red, minimum size=5.0cm, fill overzoom image=example-image-a] {};
\end{tikzpicture}
\caption{ABC\label{fig:left}}
\end{minipage}
\end{figure}

With \verb|\hspace{...}| you can shift them to the right as you like, see Fig.~\ref{fig:hspa}. 
\begin{figure}[htb]\hspace{5cm}
\begin{minipage}{.42\linewidth}
\centering
\begin{tikzpicture}
\node[circle, draw, very thick, color=red, minimum size=5.0cm, fill overzoom image=example-image-a] {};
\end{tikzpicture}
\caption{ABC\label{fig:hspa}}
\end{minipage}
\end{figure}

With \verb|\hfill| you can shift them completely to the right, see Fig.~\ref{fig:hfi}. 
\begin{figure}[htp]\hfill
\begin{minipage}{.42\linewidth}
\centering
\begin{tikzpicture}
\node[circle, draw, very thick, color=red, minimum size=5.0cm, fill overzoom image=example-image-a] {};
\end{tikzpicture}
\caption{ABC\label{fig:hfi}}
\end{minipage}
\end{figure}
\end{document}

ingrese la descripción de la imagen aquí

ingrese la descripción de la imagen aquí

información relacionada