TeX - LaTeX Asked by Angel on April 29, 2021
When I try to create symmetric curves for the left of the y-axis I get weird results. Does anyone have any idea what to do to get symmetric results?
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}
Is it better now -- i have also corrected the label W1
-- it was misaligned
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}
Answered by js bibra on April 29, 2021
If you want to mirror something, you can also invoke the magic mirr— ...ehm, I mean a scope
and apply in your case xscale=-1
.
Then you don't need to calculate anything. Of course whether this approach is convenient or not depends on your case, but for your question is a possible solution.
By the way, I have fixed some of your commands that were redundant, for example you can attach a node to a draw
without having to explicitly write it as a separate one.
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}
Answered by Alenanno on April 29, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP