
제공된 x 좌표가 시각적으로 동일한 거리로 분리되는 플롯을 만들 수 있습니까?
따라서 0 500 1000 1500 2000 대신에
0 10 20 50 100 200 ...
두 번째는 y레이블과 y좌표가 겹치는 것입니다. 레이블을 더 바깥쪽으로 이동하는 방법은 무엇입니까?
\begin{tikzpicture}
\begin{axis}[
xlabel=Züge(\#),
ylabel=Zeit(s)]
\addplot[color=red,mark=x] coordinates {
(10,25)
(20,12)
(50,33)
(100,1800)
(200,1800)
(500,1800)
(1000,509)
(2000,1514)
};
\end{axis}
\end{tikzpicture}
답변1
사용자 정의 눈금 및 눈금 레이블과 함께 로그 스케일을 사용하겠습니다.
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{semilogxaxis}[
xlabel=Züge(\#),
ylabel=Zeit(s),
xtick=\empty,
extra x ticks={10,20,50,100,200,500,1000,2000},
extra x tick labels={10,20,50,100,200,500,1000,2000}]
\addplot[color=red,mark=x] coordinates {
(10,25)
(20,12)
(50,33)
(100,1800)
(200,1800)
(500,1800)
(1000,509)
(2000,1514)
};
\end{semilogxaxis}
\end{tikzpicture}
\end{document}