tikz 绘图的代码和效果

\begin{frame}
  \frametitle{tikzpicture}
  \AppendLogo

    \begin{tikzpicture}[label distance = 2mm]

    \draw[->] (-1,0) -- (5,0) node[below,circle,draw,label distance = 1cm,label=right:This is x] {x};
    \draw[->] (0,-1) -- (0,4) node[left,rectangle,draw] {y};
    \draw[color = green,line width = 3mm] (0,0) -- plot coordinates {(1,0)  (1,1)  (0,1)} -- cycle;
    \draw[color = black,thick,rotate = 45] (3,3) circle (1cm and 2cm);
    \draw[step=0.25cm,color = blue] (1,1) grid (3,3);
    \tikzstyle{my style}=[yellow,dashed,thick];
    \draw[style = my style] (2,0) parabola (3,3);
    \draw[style = my style] (1,0) arc (0:90:1cm);

    \begin{scope}[dashed]
    \draw (2,2) circle (2cm);
    \draw (2,2) circle (1.5cm);
    \draw (2,2) circle (1cm);
    \draw (2,2) circle (0.5cm);
    \end{scope}
    \draw (5,4) node [circle,fill=gray!20,label = right:3,label=above:12,label=below:6,label = left:9]{clock};
    \draw [thick,dashed,domain=0:2] plot[id = x] function {x*x};
    \draw [thick,domain=0:1.5] plot [id = x] function {2*x*x};
  \end{tikzpicture}

\end{frame}

\begin{frame}
\frametitle{tikzpicture .cnt}
\AppendLogo
\begin{tikzpicture}
  \draw[line width=0.2cm,red] (1,1) .. controls (3,3)
                 and (0,3) .. (2,1);
  %\draw (1,0.5) node[draw,shape=circle,anchor=south west]{A} -- (0,0) node[draw,shape=circle,anchor=north east]{B};
  \path (1,0.5) node[draw,shape=circle](v0){A};
  \path (0,0) node[draw,shape=circle](v1){B};
  \draw (v0) -- (v1);

  \foreach \i in {1,...,4}
  {
    \filldraw[black] (\i,0) circle (1pt);
    \foreach \j in {1,...,3}
    {
      \filldraw[black] (\j,-1) circle (1pt);
      \draw (\i,0) -- (\j,-1);
    }
  }

%  \foreach \i/\j in {60/red,120/green,180/blue}
%  {
%    \draw[\j] (1,1) arc (\i:240:1cm);
%  }
  \draw[red] (3,1) arc (60:240:1cm);
  \draw[green] (3,1) arc (120:240:1cm);
  \draw[blue] (3,1) arc (180:240:1cm);

\end{tikzpicture}
\end{frame}

\begin{frame}
  \frametitle{tikzpicture .cnt}
  \AppendLogo

  \begin{tikzpicture}
    %\draw [thin,red,smooth,domain=0:6.5] plot[id=x] function{sin(2*x)*exp(-x/4)};
    %\draw[ycomb,gray,line width=0.3cm] plot coordinates {(1,1) (2,2) (3,3)};

    \filldraw[black,thick] (5,1) circle (3);
    \filldraw[white] (5,-0.5) circle(1.5);
    \begin{scope}
      \clip (5,1) circle (3);
      \filldraw[white] (5,-2) rectangle (8,4);
      \filldraw[black] (5,2.5) circle (1.5);
    \end{scope}
    \filldraw[white] (5,2.5) circle (0.2cm);
    \filldraw[black] (5,-0.5) circle (0.2cm);
  \end{tikzpicture}
\end{frame} 


效果如下







你可能感兴趣的:(tikz 绘图的代码和效果)