Latex 代码
\begin{figure}\begin{subfigure}[b]{0.32\textwidth}\centering\resizebox{\linewidth}{!}{\begin{tikzpicture}\coordinate (o) at (0,0);\coordinate (Si) at (2.5,2.5);\coordinate (x) at (1,0);\draw[->] (0,0) -- (3,0) node[right] {$x$};\draw[->] (0,0) -- (0,3) node[above] {$t$};\draw[-] (o) -- (Si) node[right] {$S_i$};\draw[->] (0.5,2) -- (2,2.3) node[midway, above] {$U_L$};\draw[->] (2,0.5) -- (2.3,2) node[midway, right] {$U_R$};\node[below left] {$o$};\end{tikzpicture}}\caption{shock wave}\label{fig:shock_wave_1}\end{subfigure}\begin{subfigure}[b]{0.32\textwidth}\centering\resizebox{\linewidth}{!}{\begin{tikzpicture}\coordinate (o) at (0,0);\coordinate (Si) at (2.5,2.5);\coordinate (x) at (1,0);\draw[->] (0,0) -- (3,0) node[right] {$x$};\draw[->] (0,0) -- (0,3) node[above] {$t$};\draw[dashed] (o) -- (Si) node[right] {$S_i$};\draw[->] (0.7,1.5) -- (1.7,2.5) node[midway, left] {$U_L$};\draw[->] (1.5,0.7) -- (2.5,1.7) node[midway, right] {$U_R$};\node[below left] {$o$};\end{tikzpicture}}\caption{contact discontinuity}\label{fig: contact_discontinuity_1}\end{subfigure}\begin{subfigure}[b]{0.32\textwidth}\centering\resizebox{\linewidth}{!}{\begin{tikzpicture}\coordinate (o) at (0,0);\coordinate (Si1) at (1.8,2.7);\coordinate (Si2) at (2.2,2.7);\coordinate (Si3) at (2.5,2.5);\coordinate (Si4) at (2.7,2.2);\coordinate (Si5) at (2.7,1.8);\coordinate (x) at (1,0);\draw[->] (0,0) -- (3,0) node[right] {$x$};\draw[->] (0,0) -- (0,3) node[above] {$t$};\draw[-] (o) -- (Si1) node[right] {};\draw[-] (o) -- (Si2) node[right] {};\draw[-] (o) -- (Si3) node[right] {};\draw[-] (o) -- (Si4) node[right] {};\draw[-] (o) -- (Si5) node[right] {};\draw[->] (0.5,1.5) -- (1.4,2.85) node[midway, left] {$U_L$};\draw[->] (1.5,0.5) -- (2.85,1.4) node[midway, right] {$U_R$};\node[below left] {$o$};\end{tikzpicture}}\caption{rarefaction wave}\label{fig:rarefaction_wave_1}\end{subfigure}\caption{Wave of Riemann problem}\label{fig:wave_of_riemann. $S_i$ is wave speed, $U_L,U_R$ are initial data states connected by a single wave.}
\end{figure}
输出:
绘图参考:
《Riemann Solvers and Numerical Methods for Fluid Dynamics》P84