我是 tikz 新手,我想绘制 x、y 轴以及 x、y 轴的标签,节点标签
\documentclass{standalone}
\usepackage{mathtools}
\usepackage{pgfplots}
\usepackage{siunitx}
\sisetup{per-mode=symbol}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
separate axis lines,
y axis line style= { draw opacity=0 },
x axis line style={draw opacity=0 },
xmin=0,xmax=3,
ymin=0,ymax=3,xstep=1,ystep=1,
xtick={0,...,3},
% ytick={0,...,3},
xticklabels={label-1,label-2,label-3,label-4},
axis y line*=left,
axis x line*=bottom,
xlabel={$p_0$ (psi)},
xlabel near ticks,
ylabel near ticks,
tick style={draw=none}
]
\end{axis}
\end{tikzpicture}
\end{document}
我想更换
xticklabels={label-1,label-2,label-3,label-4}
经过
\node [transform shape] (Label) at (1.5,4)[rotate=0,color=black] {label-1};
\node [transform shape] (Label) at (1.5,5)[rotate=0,color=black] {label-2};
\node [transform shape] (Label) at (1.5,6)[rotate=0,color=black] {label-3};
\node [transform shape] (Label) at (1.5,7)[rotate=0,color=black] {label-4};
是否可以