
오른쪽 상단에서 왼쪽 상단으로 이동하고 싶지만 아무 것도 작동하지 않습니다.
\begin{figure}[H]
\caption{Stress-Strain Curve, Mix C}
\begin{tikzpicture}
\begin{axis}[xlabel=Strain ,ylabel=Stress (psi), width=12cm, height=8cm]
\addplot+[smooth,color=blue,mark=o]coordinates{
(0.000001, 11)
(0.000045, 38)
(0.000123, 85)
(0.000231, 150)
(0.000371, 230)
(0.000535, 321)
(0.000709, 419)
(0.000897, 524)
(0.001094, 632)
(0.001294, 745)
(0.001502, 862)
(0.001713, 981)
(0.001929, 1103)
(0.002146, 1226)
(0.002365, 1351)
(0.002585, 1478)
(0.002806, 1605)
(0.00303, 1733)
(0.003256, 1861)
(0.003408, 1945)
};
\addlegendentry{Specimen C19E-1}
답변1
범례 위치는 다음을 통해 조정할 수 있습니다.
every axis legend/.append style={}.
그래서
every axis legend/.append style={at={(0.0,1.03)}, anchor=south west}
당신은 다음을 얻습니다:
또는
every axis legend/.append style={at={(0.03,0.97)}, anchor=north west}
당신은 다음을 얻습니다:
암호:
\documentclass[tikz, border=2pt]{standalone}
\usepackage{pgfplots}
%% if you want to change this globally
%\pgfplotsset{every axis legend/.append style={
% at={(0.0,1.03)},
% anchor=south west}}
\begin{document}
\begin{tikzpicture}
\begin{axis}[xlabel=Strain ,ylabel=Stress (psi), width=12cm, height=8cm,
every axis legend/.append style={
at={(0.,1.03)},
anchor=south west}
]
\addplot+[smooth,color=blue,mark=o]coordinates{
(0.000001, 11)
(0.000045, 38)
(0.000123, 85)
(0.000231, 150)
(0.000371, 230)
(0.000535, 321)
(0.000709, 419)
(0.000897, 524)
(0.001094, 632)
(0.001294, 745)
(0.001502, 862)
(0.001713, 981)
(0.001929, 1103)
(0.002146, 1226)
(0.002365, 1351)
(0.002585, 1478)
(0.002806, 1605)
(0.00303, 1733)
(0.003256, 1861)
(0.003408, 1945)
};
\addlegendentry{Specimen C19E-1}
\end{axis}
\end{tikzpicture}
\end{document}