当我尝试为 y 轴左侧创建对称曲线时,我得到了奇怪的结果。有人知道该怎么做才能获得对称结果吗?
\begin{figure}[h!]
\caption{???}
\centering
\begin{tikzpicture}[scale=0.5]
\draw[thick] (0,11) node[left]{$P$}--(0,0)--(12,0) node[below]{$Y$};
\draw[thick] (0,-11) node[left]{$L$}--(0,0)--(12,0);
\draw[thick] (-11,0) node[left]{$W/P$}--(0,0)--(12,0);
\draw (1,8) to [out=280,in=175] (8,1);
\node [right] at (8,1) {$AD(M_0)$};
\draw (3,8) to [out=280,in=175] (8,3);
\node [right] at (8,3) {$AD(M_1)$};
\draw(5,0)--(5,9)node[right]{$AS$};
\node[left] at (0,4.2){$P_1$};
\draw[dotted](0,4.2)--(5,4.2);
\node[left] at (0,1.9){$P_1$};
\draw[dotted](0,1.9)--(5,1.9);
\draw (-1,8) to [out=-0] (-8,1);
\node [left] at (-8,1) {$W_0$};
\draw (-3,8) to [out=0,in=175] (-8,3);
\node [right] at (-8,3) {$W_1)$};
\draw(5,0)--(5,9)node[right]{$AS$};
\foreach \Point/\PointLabel in {(5,6)/A, (6,5)/B}
\draw[fill=black] \Point circle (0.05) node[above] {$\PointLabel$};
\end{tikzpicture}
\label{fig:chart3}
\end{figure}
答案1
如果你想镜像某些东西,你也可以调用魔镜—...嗯,我的意思是scope
并适用于你的情况xscale=-1
。
那么你就不需要计算任何东西了。当然,这种方法是否方便取决于你的情况,但对于你的问题来说,这是一种可能的解决方案。
顺便说一句,我已经修复了一些多余的命令,例如,您可以将一个节点附加到一个节点,\draw
而不必明确地将其写为单独的节点。
输出
代码
\documentclass[tikz, margin=10pt]{standalone}
\begin{document}
\begin{tikzpicture}[scale=0.5]
\draw[thick] (0,11) node[left]{$P$}--(0,0)--(12,0) node[below]{$Y$};
\draw[thick] (0,-11) node[left]{$L$}--(0,0)--(12,0);
\draw[thick] (-11,0) node[left]{$W/P$}--(0,0)--(12,0);
\draw (1,8) to [out=280,in=175] (8,1)
node[right] {$AD(M_0)$};
\draw (3,8) to [out=280,in=175] (8,3)
node[right] {$AD(M_1)$};
\draw(5,0)--(5,9)node[right]{$AS$};
\draw[dotted] (0,4.2) -- (5,4.2)
node[at start, left] {$P_1$};
\draw[dotted] (0,1.9) -- (5,1.9)
node[at start, left] {$P_1$};
% MAGIC MIRROR
\begin{scope}[xscale=-1]
\draw (1,8) to [out=280,in=175] (8,1)
node[left] {$W_0$};
\draw (3,8) to [out=280,in=175] (8,3)
node[left] {$W_1$};
\end{scope}
\foreach \Point/\PointLabel in {(5,6)/A, (6,5)/B}
\draw[fill=black] \Point circle (0.05) node[above] {$\PointLabel$};
\end{tikzpicture}
\end{document}
答案2
现在好些了吗?我还修正了标签W1
,它之前没有对齐
\begin{tikzpicture}[scale=0.5]
\draw[thick] (0,11) node[left]{$P$}--(0,0)--(12,0) node[below]{$Y$};
\draw[thick] (0,-11) node[left]{$L$}--(0,0)--(12,0);
\draw[thick] (-11,0) node[left]{$W/P$}--(0,0)--(12,0);
\draw (1,8) to [out=280,in=175] (8,1);
\node [right] at (8,1) {$AD(M_0)$};
\draw (3,8) to [out=280,in=175] (8,3);
\node [right] at (8,3) {$AD(M_1)$};
\draw(5,0)--(5,9)node[right]{$AS$};
\node[left] at (0,4.2){$P_1$};
\draw[dotted](0,4.2)--(5,4.2);
\node[left] at (0,1.9){$P_1$};
\draw[dotted](0,1.9)--(5,1.9);
\draw (-1,8) to [out=260,in=15] (-8,1);
\node [left] at (-8,1) {$W_0$};
\draw (-3,8) to [out=260,in=15](-8,3);
\node [below left] at (-8,3) {$W_1$};
\draw(5,0)--(5,9)node[right]{$AS$};
\foreach \Point/\PointLabel in {(5,6)/A, (6,5)/B}
\draw[fill=black] \Point circle (0.05) node[above] {$\PointLabel$};
\end{tikzpicture}