Not necessarily nice, but not a bug: just the way circuitikz
works. Normally xscale=-1
is not used globally but only used for those components that need it (for example to orient op amps and transistors).
If you really need to set xscale=-1
globally, you can revert it for individual components by applying the same scaling again. Note that if you place this key after the component key, you must provide the full key path /tikz/xscale
here to escape circuitikz
's key namespace:
\documentclass{standalone}
\usepackage{circuitikz}
\begin{document}
\begin{circuitikz}[xscale=-1]
% this xscale must be specified also in the opamp
\draw
(0,1) to [xscale=-1,R,l=$R_1$,-*] (3,1)
% or
(0,0) to [R,/tikz/xscale=-1,l^=$R_1$,-*] (3,0)
;
\end{circuitikz}
\end{document}

Edit: Aha! Now, it becomes clear what you are actually doing. :-)
Another way to show a "mirrored" version of a circuit is to use x=-1cm
(or the opposite of whatever your global x
setting is—the default is x=1cm
). This allows you to use the same code to show a mirrored circuit, without adding extra xscale
keys everywhere.
However, this will affect label positions, because you're changing the direction the component is drawn, and the label positions are relative to this direction. You'll need to swap ^
for _
and vice versa anytime a component is drawn along the mirrored axis (here, the x-axis). Labels for components along the non-mirrored axis (here, the y-axis) are not affected and do not need to be changed.
So, depending on your circuit and how picky you are about label positions, this method may or may not result in fewer changes to the code than the first method:
\documentclass{standalone}
\usepackage[american,siunitx]{circuitikz}
\begin{document}
\begin{circuitikz}
\begin{scope}
\draw (0,0)
to[V=1<\volt>] ++(0,2)
to[R=$R_1$,-*] ++(2,0)
;\end{scope}
\begin{scope}[shift={(5,0)},x=-1cm] % add x=-1cm here and shift to move the mirrored version
\draw (0,0)
to[V=1<\volt>] ++(0,2)
to[R,l_=$R_1$,-*] ++(2,0) % swap label position here; otherwise identical code within the scopes
;\end{scope}
\end{circuitikz}
\end{document}

circuitikz
works. What is the use case for specifyingxscale=-1
globally? Normally it's just used for those components that need it.