I have a tikz picture containing scope and a textbox, located outside the main graphic (see figure below).
I obtained this figure with the following code:
\documentclass[10pt,a4paper,twoside]{report}
\usepackage{adjustbox}
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{document}
\begin{figure}[h!]
\centering
\fbox{\begin{tikzpicture}
\node [
above right,
inner sep=0] (image) at (0,0)
{\includegraphics[width=7.00cm,height=4.01cm]{example-image-duck}};
\begin{scope}[
x={($0.1*(image.south east)$)},
y={($0.1*(image.north west)$)}]
\draw[latex-, thick,black]
(4.2,5.7) -- (-3.2,8.5)
node[above,black,fill=white, draw=black]{\small Left eye};
\end{scope}
\end{tikzpicture}}%
\adjustbox{trim={0cm 0cm 0cm 0},clip}{\usebox0}
\caption{An example image to show concept}
\end{figure}
\end{document}
What I want, however, is that the whole picture would be centered around the main area (the figure of duck itself, added with includegraphics[width=7.00cm,height=4.01cm]{example-image-duck}). In other words, same type of centering as we would get without the textbox and arrow (see image below):
Browsing this site, I found that there are already some solutions for this problem, particularly Centering a TikZ picture around an area and also Centering a figure on tikz's x=0, not on the figure's actual center line. Yet somehow I am not able to successfully implement any of them, which is why I am asking you for help.
Best Answer
Is this what you are looking for?