
如何在 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}