
다음 두 TikZ
환경에서는 유사한 표시가 제공되어야 합니다. 나는 각각 데카르트 평면에 있는 5개의 포물선 그래프를 얻고 각 그래프의 왼쪽 상단에 a.), b.), c.), d.) 또는 e.) 레이블을 붙이려고 합니다. - TikZ
환경 외부.
plot1
첫 번째 디스플레이는 첫 번째 플롯의 이름을 지정하고 를 사용하여 첫 번째 플롯을 기준으로 두 번째 플롯을 이동하는 등 축 환경의 옵션을 사용합니다 at={($(plot1.east)+(1cm,0)$)}
. a.), b.), c.), d.), e.) 라벨을 붙인 것 빼고는 제가 원하는 디스플레이 입니다. 두 번째는 adjustbox
패키지를 사용합니다. 각 그래프가 너무 크고 각 데카르트 평면의 포물선이 인위적으로 이동되었습니다. 그래프는 내가 원하는 배열로 표시되고 레이블 a.), b.), c.), d.) 또는 e.)는 올바르게 배치된 것 같습니다.
\documentclass{amsart}
\usepackage{tikz}
\usetikzlibrary{calc,angles,positioning,intersections,quotes,decorations.markings}
\usepackage{adjustbox}
\usepackage{mathtools}
\usepackage{pgfplots}
\pgfplotsset{compat=1.11}
\begin{document}
\noindent This is the left margin. \vskip1.25mm
\begin{tikzpicture}
\begin{axis}[name=plot1,height=5cm,width=5cm,
axis lines=middle,
xmin=-3,xmax=3,samples=201,
xlabel=$x$,ylabel=$y$,
ymin=-9,ymax=9,
restrict y to domain=-9:9,
enlargelimits={abs=0.5cm},
axis line style={latex-latex},
xtick={\empty},ytick={\empty},
xlabel style={at={(ticklabel* cs:1)},anchor=north west},
ylabel style={at={(ticklabel* cs:1)},anchor=south west}
]
\addplot[samples=201,domain=-3:3,blue] {5*x^(2)};
\end{axis}
\begin{axis}[name=plot2,at={($(plot1.east)+(1cm,0)$)},anchor=west,height=5cm,width=5cm,
axis lines=middle,
xmin=-3,xmax=3,samples=201,
xlabel=$x$,ylabel=$y$,
ymin=-9,ymax=9,
restrict y to domain=-9:9,
enlargelimits={abs=0.5cm},
axis line style={latex-latex},
xtick={\empty},ytick={\empty},
xlabel style={at={(ticklabel* cs:1)},anchor=north west},
ylabel style={at={(ticklabel* cs:1)},anchor=south west}
]
\addplot[samples=201,domain=-3:3,blue] {-5*x^(2) + 3};
\end{axis}
\begin{axis}[name=plot3,at={($(plot1.south)-(0,1cm)$)},anchor=north,height=5cm,width=5cm,
axis lines=middle,
xmin=-3,xmax=3,samples=201,
xlabel=$x$,ylabel=$y$,
ymin=-9,ymax=9,
restrict y to domain=-9:9,
enlargelimits={abs=0.5cm},
axis line style={latex-latex},
xtick={\empty},ytick={\empty},
xlabel style={at={(ticklabel* cs:1)},anchor=north west},
ylabel style={at={(ticklabel* cs:1)},anchor=south west}
]
\addplot[samples=201,domain=-3:3,blue] {-5*(x^(2) - x)};
\end{axis}
\begin{axis}[name=plot4,at={($(plot2.south)-(0,1cm)$)},anchor=north,height=5cm,width=5cm,
axis lines=middle,
xmin=-3,xmax=3,samples=201,
xlabel=$x$,ylabel=$y$,
ymin=-9,ymax=9,
restrict y to domain=-9:9,
enlargelimits={abs=0.5cm},
axis line style={latex-latex},
xtick={\empty},ytick={\empty},
xlabel style={at={(ticklabel* cs:1)},anchor=north west},
ylabel style={at={(ticklabel* cs:1)},anchor=south west}
]
\addplot[samples=201,domain=-3:3,blue] {5*(x^(2) + x)};
\end{axis}
\begin{axis}[name=plot5,at={($(plot3.south)-(0,1cm)$)},anchor=north,height=5cm,width=5cm,
axis lines=middle,
xmin=-3,xmax=3,samples=201,
xlabel=$x$,ylabel=$y$,
ymin=-6,ymax=6,
restrict y to domain=-6:6,
enlargelimits={abs=0.5cm},
axis line style={latex-latex},
xtick={\empty},ytick={\empty},
xlabel style={at={(ticklabel* cs:1)},anchor=north west},
ylabel style={at={(ticklabel* cs:1)},anchor=south west}
]
\addplot[samples=201,domain=-3:3,blue] {-5*x^(2) - 0.5)};
\end{axis}
\end{tikzpicture}
\vfill
\pagebreak
\noindent This is the left margin. \vskip1.25mm
a.) \adjustbox{valign=t}{\begin{tikzpicture}
%These commands plot the second parabola on the Cartesian plane.
\draw[draw=gray!30,latex-latex] (0,9) +(0,0.5) node[above right] {$y$} -- (0,-9) -- +(0,-0.5);
\draw[draw=gray!30,latex-latex] (-3,0) +(-0.5,0) -- (3,0) -- +(0.5,0) node[below right] {$x$};
\begin{axis}[hide axis]
\addplot[samples=201,domain=-3:3,blue] {5*x^(2)};\end{axis}
\end{tikzpicture}}
%
b.) \adjustbox{valign=t}{\begin{tikzpicture}
%These commands plot the second parabola on the Cartesian plane.
\draw[draw=gray!30,latex-latex] (0,9) +(0,0.5) node[above right] {$y$} -- (0,-9) -- +(0,-0.5);
\draw[draw=gray!30,latex-latex] (-3,0) +(-0.5,0) -- (3,0) -- +(0.5,0) node[below right] {$x$};
\begin{axis}[hide axis]\addplot[samples=201,domain=-3:3,blue] {-5*x^(2) + 3};\end{axis}
\end{tikzpicture}}
%
c.) \adjustbox{valign=t}{\begin{tikzpicture}
%These commands plot the second parabola on the Cartesian plane.
\draw[draw=gray!30,latex-latex] (0,9) +(0,0.5) node[above right] {$y$} -- (0,-9) -- +(0,-0.5);
\draw[draw=gray!30,latex-latex] (-3,0) +(-0.5,0) -- (3,0) -- +(0.5,0) node[below right] {$x$};
\begin{axis}[hide axis]\addplot[samples=201,domain=-3:3,blue] {-5*(x^(2) - x};\end{axis}
\end{tikzpicture}}
%
d.) \adjustbox{valign=t}{\begin{tikzpicture}
%These commands plot the second parabola on the Cartesian plane.
\draw[draw=gray!30,latex-latex] (0,9) +(0,0.5) node[above right] {$y$} -- (0,-9) -- +(0,-0.5);
\draw[draw=gray!30,latex-latex] (-3,0) +(-0.5,0) -- (3,0) -- +(0.5,0) node[below right] {$x$};
\begin{axis}[hide axis]\addplot[samples=201,domain=-3:3,blue] {5*(x^(2) + x)};\end{axis}
\end{tikzpicture}}
%
e.) \adjustbox{valign=t}{\begin{tikzpicture}
%These commands plot the second parabola on the Cartesian plane.
\draw[draw=gray!30,latex-latex] (0,9) +(0,0.5) node[above right] {$y$} -- (0,-9) -- +(0,-0.5);
\draw[draw=gray!30,latex-latex] (-3,0) +(-0.5,0) -- (3,0) -- +(0.5,0) node[below right] {$x$};
\begin{axis}[hide axis]\addplot[samples=201,domain=-3:3,blue] {-5*x^(2) - 0.5};\end{axis}
\end{tikzpicture}}
\hspace{\fill}
\end{document}
답변1
한 가지 해결책은 tikzpicture 환경의 스케일 옵션을 사용하여 플롯의 크기를 줄이는 것입니다. 나는 위치 그래프가 벗어난 이유를 찾지 않았습니다. 플롯 영역과 플롯된 그래프가 일치하지 않는지 매우 주의 깊게 확인해야 합니다.
\documentclass{amsart}
\usepackage{tikz}
\usetikzlibrary{calc,angles,positioning,intersections,quotes,decorations.markings}
\usepackage{adjustbox}
\usepackage{mathtools}
\usepackage{pgfplots}
\pgfplotsset{compat=1.11}
\begin{document}
a.) \adjustbox{valign=t}{\begin{tikzpicture}[scale=.25]
%These commands plot the second parabola on the Cartesian plane.
\draw[draw=gray!30,latex-latex] (0,9) +(0,0.5) node[above right] {$y$} -- (0,-9) -- +(0,-0.5);
\draw[draw=gray!30,latex-latex] (-3,0) +(-0.5,0) -- (3,0) -- +(0.5,0) node[below right] {$x$};
\begin{axis}[hide axis]
\addplot[samples=201,domain=-3:3,blue] {5*x^(2)};\end{axis}
\end{tikzpicture}}
%
b.) \adjustbox{valign=t}{\begin{tikzpicture}[scale=.25]
%These commands plot the second parabola on the Cartesian plane.
\draw[draw=gray!30,latex-latex] (0,9) +(0,0.5) node[above right] {$y$} -- (0,-9) -- +(0,-0.5);
\draw[draw=gray!30,latex-latex] (-3,0) +(-0.5,0) -- (3,0) -- +(0.5,0) node[below right] {$x$};
\begin{axis}[hide axis]\addplot[samples=201,domain=-3:3,blue] {-5*x^(2) + 3};\end{axis}
\end{tikzpicture}}
%
c.) \adjustbox{valign=t}{\begin{tikzpicture}[scale=.25]
%These commands plot the second parabola on the Cartesian plane.
\draw[draw=gray!30,latex-latex] (0,9) +(0,0.5) node[above right] {$y$} -- (0,-9) -- +(0,-0.5);
\draw[draw=gray!30,latex-latex] (-3,0) +(-0.5,0) -- (3,0) -- +(0.5,0) node[below right] {$x$};
\begin{axis}[hide axis]\addplot[samples=201,domain=-3:3,blue] {-5*(x^(2) - x};\end{axis}
\end{tikzpicture}}
%
d.) \adjustbox{valign=t}{\begin{tikzpicture}[scale=.25]
%These commands plot the second parabola on the Cartesian plane.
\draw[draw=gray!30,latex-latex] (0,9) +(0,0.5) node[above right] {$y$} -- (0,-9) -- +(0,-0.5);
\draw[draw=gray!30,latex-latex] (-3,0) +(-0.5,0) -- (3,0) -- +(0.5,0) node[below right] {$x$};
\begin{axis}[hide axis]\addplot[samples=201,domain=-3:3,blue] {5*(x^(2) + x)};\end{axis}
\end{tikzpicture}}
%
e.) \adjustbox{valign=t}{\begin{tikzpicture}[scale=.25]
%These commands plot the second parabola on the Cartesian plane.
\draw[draw=gray!30,latex-latex] (0,9) +(0,0.5) node[above right] {$y$} -- (0,-9) -- +(0,-0.5);
\draw[draw=gray!30,latex-latex] (-3,0) +(-0.5,0) -- (3,0) -- +(0.5,0) node[below right] {$x$};
\begin{axis}[hide axis]\addplot[samples=201,domain=-3:3,blue] {-5*x^(2) - 0.5};\end{axis}
\end{tikzpicture}}
\hspace{\fill}
\end{document}
포물선을 표시하는 다른 방법은 다음과 같습니다. 다른 가능성을 보려면 축 환경 옵션에 관한 pgfplots 매뉴얼을 살펴보기만 하면 됩니다.
\documentclass{amsart}
\usepackage{tikz}
\usetikzlibrary{calc,angles,positioning,intersections,quotes,decorations.markings}
\usepackage{adjustbox}
\usepackage{mathtools}
\usepackage{pgfplots}
\pgfplotsset{compat=1.11}
\begin{document}
\noindent This is the left margin. \vskip1.25mm
a.) \adjustbox{valign=t}{\begin{tikzpicture}
%These commands plot the second parabola on the Cartesian plane.
\begin{axis}[grid=none,
mark = none,
xmin = -3, ymin = -45,
xmax = 3,ymax = 45,
axis lines*=middle,
enlargelimits=upper,
clip=false]
\addplot[samples=201,domain=-3:3,blue] {5*x^(2)};\end{axis}
\end{tikzpicture}}
%
b.) \adjustbox{valign=t}{\begin{tikzpicture}
%These commands plot the second parabola on the Cartesian plane.
\begin{axis}[grid=none,
mark = none,
xmin = -3, ymin = -45,
xmax = 3,ymax = 45,
axis lines*=middle,
enlargelimits=upper,
clip=false]
\addplot[samples=201,domain=-3:3,blue] {-5*x^(2) + 3};\end{axis}
\end{tikzpicture}}
\par
c.) \adjustbox{valign=t}{\begin{tikzpicture}
%These commands plot the second parabola on the Cartesian plane.
\begin{axis}[grid=none,
mark = none,
xmin = -3, ymin = -45,
xmax = 3,ymax = 45,
axis lines*=middle,
enlargelimits=upper,
clip=false]
\addplot[samples=201,domain=-3:3,blue] {-5*(x^(2) - x};\end{axis}
\end{tikzpicture}}
%
d.) \adjustbox{valign=t}{\begin{tikzpicture}
%These commands plot the second parabola on the Cartesian plane.
\begin{axis}[grid=none,
mark = none,
xmin = -3, ymin = -45,
xmax = 3,ymax = 45,
axis lines*=middle,
enlargelimits=upper,
clip=false]
\addplot[samples=201,domain=-3:3,blue] {5*(x^(2) + x)};\end{axis}
\end{tikzpicture}}
\par
e.) \adjustbox{valign=t}{\begin{tikzpicture}
%These commands plot the second parabola on the Cartesian plane.
\begin{axis}[grid=none,
mark = none,
xmin = -3, ymin = -45,
xmax = 3,ymax = 45,
axis lines*=middle,
enlargelimits=upper,
clip=false]
\addplot[samples=201,domain=-3:3,blue] {-5*x^(2) - 0.5};\end{axis}
\end{tikzpicture}}
\end{document}
코드의 전반부를 사용하는 다이어그램.
\documentclass{amsart}
\usepackage{tikz}
\usetikzlibrary{calc,angles,positioning,intersections,quotes,decorations.markings}
\usepackage{adjustbox}
\usepackage{mathtools}
\usepackage{pgfplots}
\pgfplotsset{compat=1.11}
\begin{document}
\noindent This is the left margin. \vskip1.25mm
\begin{tikzpicture}
\begin{axis}[name=plot1,height=5cm,width=5cm,
axis lines=middle,
xmin=-3,xmax=3,samples=201,
xlabel=$x$,ylabel=$y$,
ymin=-9,ymax=9,
restrict y to domain=-9:9,
enlargelimits={abs=0.5cm},
axis line style={latex-latex},
xtick={\empty},ytick={\empty},
xlabel style={at={(ticklabel* cs:1)},anchor=north west},
ylabel style={at={(ticklabel* cs:1)},anchor=south west}
]
\addplot[samples=201,domain=-3:3,blue] {5*x^(2)};
\node at (axis cs:-4.5,14) [anchor= north west] {a.)};
\end{axis}
\begin{axis}[name=plot2,at={($(plot1.east)+(1cm,0)$)},anchor=west,height=5cm,width=5cm,
axis lines=middle,
xmin=-3,xmax=3,samples=201,
xlabel=$x$,ylabel=$y$,
ymin=-9,ymax=9,
restrict y to domain=-9:9,
enlargelimits={abs=0.5cm},
axis line style={latex-latex},
xtick={\empty},ytick={\empty},
xlabel style={at={(ticklabel* cs:1)},anchor=north west},
ylabel style={at={(ticklabel* cs:1)},anchor=south west}
]
\addplot[samples=201,domain=-3:3,blue] {-5*x^(2) + 3};
\node at (axis cs:-4.5,14) [anchor= north west] {b.)};
\end{axis}
\begin{axis}[name=plot3,at={($(plot1.south)-(0,1cm)$)},anchor=north,height=5cm,width=5cm,
axis lines=middle,
xmin=-3,xmax=3,samples=201,
xlabel=$x$,ylabel=$y$,
ymin=-9,ymax=9,
restrict y to domain=-9:9,
enlargelimits={abs=0.5cm},
axis line style={latex-latex},
xtick={\empty},ytick={\empty},
xlabel style={at={(ticklabel* cs:1)},anchor=north west},
ylabel style={at={(ticklabel* cs:1)},anchor=south west}
]
\addplot[samples=201,domain=-3:3,blue] {-5*(x^(2) - x)};
\node at (axis cs:-4.5,14) [anchor= north west] {c.)};
\end{axis}
\begin{axis}[name=plot4,at={($(plot2.south)-(0,1cm)$)},anchor=north,height=5cm,width=5cm,
axis lines=middle,
xmin=-3,xmax=3,samples=201,
xlabel=$x$,ylabel=$y$,
ymin=-9,ymax=9,
restrict y to domain=-9:9,
enlargelimits={abs=0.5cm},
axis line style={latex-latex},
xtick={\empty},ytick={\empty},
xlabel style={at={(ticklabel* cs:1)},anchor=north west},
ylabel style={at={(ticklabel* cs:1)},anchor=south west}
]
\addplot[samples=201,domain=-3:3,blue] {5*(x^(2) + x)};
\node at (axis cs:-4.5,14) [anchor= north west] {d.)};
\end{axis}
\begin{axis}[name=plot5,at={($(plot3.south)-(0,1cm)$)},anchor=north,height=5cm,width=5cm,
axis lines=middle,
xmin=-3,xmax=3,samples=201,
xlabel=$x$,ylabel=$y$,
ymin=-6,ymax=6,
restrict y to domain=-6:6,
enlargelimits={abs=0.5cm},
axis line style={latex-latex},
xtick={\empty},ytick={\empty},
xlabel style={at={(ticklabel* cs:1)},anchor=north west},
ylabel style={at={(ticklabel* cs:1)},anchor=south west}
]
\addplot[samples=201,domain=-3:3,blue] {-5*x^(2) - 0.5)};
\node at (axis cs:-4.5,9) [anchor= north west] {e.)};
\end{axis}
\end{tikzpicture}
\end{document}