【问题标题】:How can I write the code of bellow figure in Latex?如何在 Latex 中编写波纹管图形的代码?
【发布时间】:2021-06-21 03:44:08
【问题描述】:

帮我用 Latex 写给定图形的代码。

【问题讨论】:

  • 查看texample.net/tikz/examples - 它有许多示例,您可以使用灵感来制作您需要的图形。
  • 你能告诉我们你已经尝试过的代码吗?我相信我们可以帮助您完成剩下的工作。

标签: latex coding-style tikz overleaf


【解决方案1】:

给你一些开始:

\documentclass{standalone}
\usepackage{tikz}

\begin{document}
    
\begin{tikzpicture}
    \fill[blue,draw=black] (0,0) arc [start angle=180, end angle=0, radius=6];
    \fill[violet,draw=black] (0,0) arc [start angle=180, end angle=0, radius=5];
    \fill[red,draw=black] (0,0) arc [start angle=180, end angle=0, radius=4];
    \fill[orange,draw=black] (0,0) arc [start angle=180, end angle=0, radius=3];
  \fill[yellow,draw=black] (0,0) arc [start angle=180, end angle=0, radius=2];
  \foreach \x in {0,...,6}{
    \node at (2*\x,-0.3) {\x};
  }
\end{tikzpicture}   
    
\end{document}

【讨论】:

    【解决方案2】:

    我的版本有一些循环:

    \documentclass[border=5mm]{standalone}
    \usepackage{tikz}
    
    \begin{document}
    \begin{tikzpicture}
      \foreach \n in {0,...,6} \node [below] at (\n,0) {$\n$};
      \foreach \m/\c in {6/0,5/25,4/50,3/75,2/100}%
        \filldraw [black,fill=lime!\c!blue] (\m,0) arc(0:180:.5*\m) -- cycle;
      \foreach \n in {1,...,5} \node [above] at (\n+.5,.1) {$\mathcal{U}_{\n}$};
      \draw (0,0) -- (7,0);
      \draw (1,.08) -- (1,-.08);
    \end{tikzpicture}
    \end{document}
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-07-02
      • 2011-02-13
      • 1970-01-01
      • 2023-02-16
      • 2012-10-23
      • 1970-01-01
      • 2010-11-26
      • 2011-02-28
      相关资源
      最近更新 更多