
xy 평면에서 레이블을 사용하여 x축을 이동하는 방법은 무엇입니까? 이 코드로 시도했지만 실패했습니다. X선을 이동하지만 해당 레이블이 올바른 위치에 있지 않습니다.
\documentclass[]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage{fullpage,amsmath,tkz-base}
\begin{document}
\begin{tikzpicture}
\tkzInit[xmin=0, ymin=0, xmax=10,ymax=10,xstep=1,ystep=1]
\tkzAxeX[label=,xshift=2cm]
\tkzAxeY[label=]
\end{tikzpicture}
\end{document}
레이블을 사용하여 x 및 y 줄을 이동해야 합니다.
답변1
그러면 원래 축을 "제거"하고 다시 그립니다.
\documentclass[]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage{fullpage,amsmath,tkz-base}
\usetikzlibrary{arrows}
\begin{document}
\begin{tikzpicture}[myaxis/.style={thin, ->, >=stealth, shorten >=-15pt}]
\tkzInit[xmin=0, ymin=0, xmax=10, ymax=10, xstep=1, ystep=1]
\tkzAxeY[label=,style={very thin,opacity=0}]
\tkzAxeX[label=,xshift=2cm, style={very thin,opacity=0}]
\draw [myaxis] (2,0) -- (12, 0);
\draw [myaxis] (0,0) -- (0,10);
\end{tikzpicture}
\end{document}