因此,我正在尝试绘制一个图表,并以以下 MWE 作为起点:
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows,patterns}
\begin{document}
\begin{tikzpicture}[scale=2,>=stealth]
\draw[->,red] (3mm,0mm) arc (0:135:3mm) node[midway,xshift=2mm,yshift=2mm] {$\theta$};
\draw (0,0) circle (1cm);
\draw[fill=green,pattern=dots,pattern color=black!60!green]
node[below,xshift=2mm]{O} (0,0) -- node[above,black!60!green]{$r$} (135:1cm) node[left,xshift=2mm,yshift=2mm]{$\textbf{P}(x,y)$} -- node[left,black!60!green]{$y$} +(0,-0.707) -- node[below,black!60!green]{$x$} (0,0) -- cycle;
\draw[->] (-1.5,0) -- (1.5,0) node[anchor=west]{$x$};
\draw[->] (0,-1.5) -- (0,1.5) node[anchor=east]{$y$};
\draw (-.607,0) -- +(0,.1) -- +(-.1,0.1);
\end{tikzpicture}
\end{document}
输出以下图像:
我想修改它,以便:
- 删除P(x,y)点,以及内三角形。
- 将三角形转换为正方形,例如突出显示第二象限,保持绿色虚线图案。以下是象限编号的参考:
我希望角弧(图中的“theta”)从 Y 轴开始,而不是 X 轴,并且始终逆时针方向。
用“psi”替换“theta”。
更新
给你一个想法:
答案1
编辑
根据 OP 的绘图,我编辑了我的答案以提供一些更有可能满足他需求的内容。
\documentclass[tikz,border=3.14]{standalone}
\usetikzlibrary{arrows,patterns}
\begin{document}
\begin{tikzpicture}[scale=2,>=stealth]
\path[fill=green,pattern=dots,pattern color=black!60!green] (0,0) rectangle (-1.45,1.45);
\draw[->,red] (0mm,3mm) arc (90:135:3mm) node[circle,inner sep=0pt,fill=white,midway,above=2pt] {$\psi$};
\draw (0,0) circle (1cm);
\draw[dashed,opacity=0.5] (0,0) -- (135:1cm);
\draw[->] (-1.5,0) -- (1.5,0) node[anchor=west]{$x$};
\draw[->] (0,-1.5) -- (0,1.5) node[anchor=west]{$y$};
\end{tikzpicture}
\end{document}
并且随着角度的增加,扇区也充满了:
\documentclass[tikz,border=3.14]{standalone}
\usetikzlibrary{arrows,patterns}
\begin{document}
\begin{tikzpicture}[scale=2,>=stealth]
\path[fill=green,pattern=dots,pattern color=black!60!green] (0,0) rectangle (-1.45,1.45);
\draw[->,red] (0mm,3mm) arc (90:135:3mm) node[circle,inner sep=0pt,fill=white,midway,above=2pt] {$\psi$};
\fill[red,opacity=0.3] (0,0) -- (0,1cm) arc(90:135:1cm) -- cycle; <-- This is what was added
\draw (0,0) circle (1cm);
\draw[dashed,opacity=0.5] (0,0) -- (135:1cm);
\draw[->] (-1.5,0) -- (1.5,0) node[anchor=west]{$x$};
\draw[->] (0,-1.5) -- (0,1.5) node[anchor=west]{$y$};
\end{tikzpicture}
\end{document}