The problem: Position a tikz-draw that uses scope inside an axis environment using the coordinate system axis cs.
The problem is better explained before the following code, which is the currently not good solution implemented.
\documentclass[12pt]{report}
\usepackage[portuges, brazilian]{babel} % Hiphenação em portugues
\usepackage{graphics} % Suporte padrão para gráficos
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{pgfplots}
\pgfplotsset{grid=major,compat=1.11}
\begin{document}
\begin{figure}[!htb]
\centering
\begin{tikzpicture}
\pgfmathsetmacro{\Ffactor}{0.6}
\coordinate (car1) at (0.50,1.95);
\begin{scope} [rotate around={-25:(car1)}]
\draw[fill=yellow] (car1) + ($\Ffactor*(-0.250, 0.100)$) rectangle + ($\Ffactor*(0.250,-0.100)$);
\draw[fill=black] (car1) ++ ($\Ffactor*(-0.250, 0.100)$) rectangle + ($\Ffactor*( 0.175, 0.075)$); % rear left wheel
\draw[fill=black] (car1) ++ ($\Ffactor*( 0.250, 0.100)$) rectangle + ($\Ffactor*(-0.175, 0.075)$); % front left wheel
\draw[fill=black] (car1) ++ ($\Ffactor*( 0.250,-0.100)$) rectangle + ($\Ffactor*(-0.175,-0.075)$); % front right wheel
\draw[fill=black] (car1) ++ ($\Ffactor*(-0.250,-0.100)$) rectangle + ($\Ffactor*( 0.175,-0.075)$); % rear right wheel
\end{scope}
\begin{axis}[ ]
%
% SOME CODES
%
\end{axis}
\end{tikzpicture} %
\end{figure}
\end{document}
From the code, it is possible to see that the mentioned tikz-draw is specified by the first block of code and its position set by the coordinate (car1). In sequence, there is the axis environment, which has, in the real implementation, some graphs. I need to place the tikz-draw via the coordinate (car1) in same place that is, some how, related with the graphs from the axis environment. Currently, with an attempt and error approach, I am taking quite a while to place the tikz-draw in the desired place.
I thought that it would be possible, to put that block of code related with the tikz-draw inside the axis environment and use the axis cs coordinate frame to set the tikz-draw position as show bellow
\begin{tikzpicture}
\begin{axis}[ ]
%
% SOME CODES
%
\pgfmathsetmacro{\Ffactor}{0.6}
\coordinate (car1) at (axis cs: 0.50,1.95); <----------
\begin{scope} [rotate around={-25:(car1)}]
\draw[fill=yellow] (car1) + ($\Ffactor*(-0.250, 0.100)$) rectangle + ($\Ffactor*(0.250,-0.100)$);
\draw[fill=black] (car1) ++ ($\Ffactor*(-0.250, 0.100)$) rectangle + ($\Ffactor*( 0.175, 0.075)$); % rear left wheel
\draw[fill=black] (car1) ++ ($\Ffactor*( 0.250, 0.100)$) rectangle + ($\Ffactor*(-0.175, 0.075)$); % front left wheel
\draw[fill=black] (car1) ++ ($\Ffactor*( 0.250,-0.100)$) rectangle + ($\Ffactor*(-0.175,-0.075)$); % front right wheel
\draw[fill=black] (car1) ++ ($\Ffactor*(-0.250,-0.100)$) rectangle + ($\Ffactor*( 0.175,-0.075)$); % rear right wheel
\end{scope}
%
% SOME CODE
%
\end{axis}
\end{tikzpicture} %
but, for my surprise, its seens to be some incompatibility between the axis and the scope environment, because this new solution retrieves the errors:
Package pgf Error: No shape named car1 is known. \begin{scope} [rotate around={-25:(car1)}] Package pgf Error: No shape named car1 is known. \begin{scope} [rotate around={-25:(car1)}]
Therefore, my question is how to work around this issue.
Thanks.