Issue and Question
I encountered that my graphics are all upside down. Now I have to mirror them in pgfplots
. How can I perform this step?
It is no solution using the option [y dir=reverse]
which also turns the axis label upside down (MWE):
\documentclass{standalone}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[y dir=reverse]
\addplot graphics {GraphicsFile.png};
\end{axis}
\end{tikzpicture}
\end{document}
Appearance
This issue appeared due to the usage of matlab2tikz
where in MATLAB. I performed the following command to correct the orientation.
set(gca,'Ydir','normal');
Now that I applied all changes/adaptations to my figures I do not want to go back. But maybe you could also give a short answer about improving my usage of MATLAB.
Best Answer
To flip your graphic, you can pass options to the
plot graphics/node
to scale the node vertically by-1
and change its default anchor point:By default the node has anchor at
south west
.Generally one can pass
\includegraphics
options to the viabut no combination of the includegraphics options does a reverse of orientation, so we have to pass the options to the node instead.