我需要一张这样的照片
以下是一个尝试:
\documentclass{article}
\usepackage{pgfplots}
\usetikzlibrary{decorations.markings}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw[-stealth, thick](0,0)--(4,0) node[below]{$x$};
\draw[-stealth, thick](2,-2)--(2,2) node[left]{$y$};
\draw (2,0) circle (1.2cm);
\end{tikzpicture}
\end{document}
答案1
PSTricks 解决方案:
\documentclass{article}
\usepackage{pstricks-add}
\begin{document}
\begin{pspicture}(-3.9,-3.9)(4.4,4.4)
\psaxes[labels = none, ticks = none]{->}(0,0)(-3.9,-3.9)(4,4)[$x$,0][$y$,90]
\pscircle(0,0){3}
\pnodes(1.8,1.2){A}(3.3,3.3){B}
\psdots(A)(B)
\uput[135](A){a}
\uput[135](B){b}
\end{pspicture}
\end{document}
答案2
只是为了tikz
给问题添加一个解决方案tikz
。您可以绘制node
:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw[-stealth, thick](0,0)--(4,0) node[below]{$x$};
\draw[-stealth, thick](2,-2)--(2,2) node[left]{$y$};
\draw (2,0) circle (1.2cm);
\node[circle,fill,label={120:a},inner sep=1.5pt,outer sep=-2pt] at (2.8,0.5) {};
\node[circle,fill,label={120:b},inner sep=1.5pt,outer sep=-2pt] at (3.2,1) {};
\end{tikzpicture}
\end{document}
答案3
使用 PGFPlots:
\documentclass{article}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
axis equal image,
axis lines=middle,
enlargelimits=0.2,
xtick=\empty, ytick=\empty,
xlabel=$x$, ylabel=$y$
]
\addplot [thick, smooth, domain=0:360, data cs=polar] (x,1);
\addplot [only marks, black, mark=*, nodes near coords, point meta=explicit symbolic] table [meta=label] {
x y label
0.5 0.4 a
0.8 1 b
};
\end{axis}
\end{tikzpicture}
\end{document}
答案4
另一个使用 PSTricks 的解决方案只是为了好玩!它可能比现有的更简单。
\documentclass[pstricks,border=12pt,12pt]{standalone}
\usepackage{pst-eucl,pst-plot}
\begin{document}
\begin{pspicture}(-4,-4)(4.5,4.5)
\psaxes[labels=none,ticks=none]{->}(0,0)(-4,-4)(4,4)[$x$,0][$y$,90]
\pscircle{3}
\pstGeonode[PosAngle=120](2,1){a}(3.5,3.5){b}
\end{pspicture}
\end{document}