我想知道是否可以使用 tikz(或使用 pgfplot)来绘制这样的图:
我需要一些帮助,谢谢
这是一个开始:
\documentclass{article}
\usepackage{tikz}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{semilogxaxis}[xmin=0,xmax=10e8,ymin=100,ymax=900,axis lines=left, xlabel={$\log N$},ylabel={$\log\sigma_a$}]
\addplot [dashed,black]{700};
\addplot [dashed,black]{330};
\end{semilogxaxis}
\end{tikzpicture}
\end{document}
答案1
以下是获得类似结果的一种方法:
\documentclass{article}
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=1.10}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
xmode=log, ymode=log,
xmin=1e4,xmax=1.9e8,
ymin=1e1,ymax=1.9e4,
axis lines=left,
xlabel={$N$},ylabel={$\sigma_a$},
grid=major,
clip mode=individual,
yticklabel={\empty},
tick label style={text height=2ex}, % For proper vertical alignment
extra x ticks={3e6},
extra x tick labels={$N_{CR}$},
extra y ticks={9e1},
extra y tick labels={$\sigma_{(L)}$},
extra tick style={
grid=none,
tick label style={ font=\boldmath}
},
]
\addplot [thick, black] table {
N sigma
1e4 5e3
1e5 2.5e3
3e6 9e1
1.9e8 9e1
};
\node [font=\boldmath, left] at (axis cs:1e4,5e3) {$A$};
\node [font=\boldmath, above] at (axis cs:1e5,2.5e3) {$B$};
\node [font=\boldmath, anchor=-120] at (axis cs:6e6,9e1) {$C_R$};
\node [font=\boldmath, above] at (axis cs:8e7,9e1) {$D$};
\draw [densely dashed] (axis cs:1e4,9e1) -| (axis cs:3e6,1e1);
\end{axis}
\end{tikzpicture}
\end{document}
答案2
\begin{tikzpicture}
\begin{semilogxaxis}[
width = \columnwidth, height = 0.7\columnwidth,
xmin = 1, xmax = 1e10,
ymin = 100, ymax = 900,
xlabel = {$\log N$}, ylabel = $\log \sigma_a$,
axis on top=true,
axis lines=left,
xtick={1,10,1e2,1e3,1e4,1e5,1e6,1e7,1e8},
xticklabels={$0$,$10$,$10^2$,$10^3$,$10^4$,$10^5$,$10^6$,$10^7$,$10^8$},
ytick={700,630,470,330},
yticklabels={$\sigma_R$,630,$\sigma_S$,$\sigma_D$},
]
\addplot [very thick, black] table {
N sigma
1 700
1000 630
1e7 330
1e10 330
};
\node [anchor=south west] at (axis cs:1000,630) {$F$};
\filldraw[black] (axis cs:1000,630) circle(1.3pt);
\node [anchor=south west] at (axis cs:10^7,330) {$G$};
\filldraw[black] (axis cs:10^7,330) circle(1.3pt);
\node [anchor=south] at (axis cs:10^9,330) {$\sigma_m=0$};
\draw [dashed] (axis cs:1,330) -| (axis cs:1e7,100);
\draw [dashed] (axis cs:1,630) -| (axis cs:1e3,100);
\end{semilogxaxis}
\end{tikzpicture}