0.请有简化你问题的意识,不要让别人看一大堆与你问题无关的代码。
明明下面的十几行就可以完全反映你的问题,为什么要上传七八十行的代码(?) Tell Me Why?! Why?!
这给别人增加了很大的负担
\documentclass[tikz,border=5pt]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
\usetikzlibrary{arrows.meta}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
axis lines = middle,
xmin = -0.05, xmax = 1.1,
ymin = -0.05, ymax = 1.4,
axis line style = {-{Triangle[length=8pt, width=3pt]}},
ytick distance = 0.2,
]
\addplot[domain=0:1.4, thick, blue, samples=100] {x^2};
\end{axis}
\end{tikzpicture}
\end{document}1.比较简陋的做法
坐标轴刻度线与箭头距离太近,增大xmax或ymax时坐标轴并没有延长相应的单位长度
指定ymax=1.35不可以吗? 不是很清楚你的具体需求?
\documentclass[tikz,border=5pt]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
\usetikzlibrary{arrows.meta}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
axis lines = middle,
xmin = -0.05, xmax = 1.1,
ymin = -0.05, ymax = 1.35,
axis line style = {-{Triangle[length=8pt, width=3pt]}},
ytick distance = 0.2,
]
\addplot[domain=0:1.4, thick, blue, samples=100] {x^2};
\end{axis}
\end{tikzpicture}
\end{document}
2.使用tikz的arrow提供的shorten >=功能调整「箭头末端」的长度:
读文档!

\documentclass[tikz,border=5pt]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
\usetikzlibrary{arrows.meta}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
axis lines = middle,
xmin = -0.05, xmax = 1.1,
ymin = -0.05, ymax = 1.4,
axis line style = {-{Triangle[length=8pt, width=3pt]},shorten >=-.8cm},
ytick distance = 0.2,
]
\addplot[domain=0:1.4, thick, blue, samples=100] {x^2};
\end{axis}
\end{tikzpicture}
\end{document}这将在保持使用ymax=1.4的同时得到:























问 坐标轴刻度线与箭头距离太近,增大xmax或ymax时坐标轴并没有延长相应的单位长度