コード

コード

2本の線の間に角度を描こうとしています。

これまでのところこのコードはありますが、角度を描くことができません。どうすればいいでしょうか? PGF/TikZ を使用しています。

\begin{figure}
   \begin{tikzpicture}
      \begin{axis}[
         ticks=none,
         axis lines = middle,
         axis line style={->},
         ymin=-1.5, ymax=1.5,
         xmin=-1.5, xmax=1.5,
         axis equal]
         \addplot[black, domain=0:0.7071] {x};
         \draw[black] (axis cs:0,0) circle [radius=1];
      \end{axis}
   \end{tikzpicture}
\end{figure}

ありがとう。

答え1

ここで操作arcを使用できます。TikZ/PGFマニュアルで推奨されている一般的な構文(@トビコメントは

\draw (<starting point>) arc [<options>];

以下のオプションがあります:

  • radius=<dim>
  • x radius=<dim>
  • y radius=<dim>
  • start angle=<deg>
  • end angle=<deg>
  • delta angle=<deg>

または読みにくいバージョン

\draw (<starting point>) arc (<start angle>:<end angle>:<radius>);

ここで<radius>、長さは単一でも、<dim> and <dim>半径は異なっていてもかまいません。

コード

\documentclass[border=2pt]{standalone}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
  \begin{axis}[
      ticks=none,
      axis lines = middle,
      axis line style={->},
      ymin=-1.5, ymax=1.5,
      xmin=-1.5, xmax=1.5,
    axis equal]
    \addplot[black, domain=0:0.7071] {x};
    \draw[black] (axis cs:0,0) circle [radius=1];
    \draw (axis cs:.125,0)arc[radius=.25cm,start angle=0,end angle=45];
    % \draw (axis cs:.125,0)arc(0:45:.25cm); % same as above with different syntax
  \end{axis}
\end{tikzpicture}  
\end{document}

出力

ここに画像の説明を入力してください

答え2

PSTricks を使用。こんな感じですか?

\documentclass[pstricks,border=12pt]{standalone}
\usepackage{pst-eucl}
\begin{document}
\begin{pspicture}[showgrid](-2,-2)(4,4)
    \pstGeonode
        (1,1){B}
        ([nodesep=2,angle=60]B){A}
        ([nodesep=2,angle=20]B){C}
    \pscircle(B){2}
    \psline(A)(B)(C)
    \psarc[origin={B}](B){1}{(C)}{(A)}
\end{pspicture}
\end{document}

ここに画像の説明を入力してください

バージョン2

\documentclass[pstricks,border=12pt]{standalone}
\usepackage{pst-node}
\begin{document}
\begin{pspicture}[showgrid](-2,-2)(2,2)
    \psline(-2,0)(2,0)
    \psline(0,-2)(0,2)
    \pnodes(0,0){B}(1;60){A}(1;20){C}
    \psline(A)(B)(C)
    \psarc[origin={B}](B){.2}{(C)}{(A)}
\end{pspicture}
\end{document}

ここに画像の説明を入力してください

関連情報