我想将标签放在 y 轴的左侧,但文本会被截断。我该如何避免这种情况?
(此外,这些作品看起来很糟糕,因此,任何关于如何使其看起来更好的想法都将不胜感激。我想重新创建这个:如何在没有 y 轴的情况下生成对数 x 轴?)
\documentclass{article}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
width=12cm,
y=2cm, % y unit vector
hide y axis, % hide the y axis
xmode = log, % logarithmic x axis
axis x line*=bottom,% only show the bottom x axis line, without an arrow tip
xmin=1e-4, xmax=1e2,% range for the x axis
xlabel = Dose in Sv,
every x tick/.style={black, line width=0.3pt}
]
\addplot [no markers, line width=8pt] table {
0.002 1
0.004 1
};
\node[anchor=east] at (axis cs:2e-4,1) {Hello};
\addplot [no markers, line width=8pt] table {
60 2
100 2
};
\node[anchor=east] at (axis cs:2e-4,1) {Hello};
\node[anchor=east] at (axis cs:2e-4,2) {Is it me you're looking for?};
\end{axis}
\end{tikzpicture}
\end{document}