缺少角度标记

缺少角度标记

我刚刚画了一张图,我想标记两条相交线之间的角度(您可以使用下面给出的 MWE 看到)。但是,没有出现圆弧(用于标记角度)。更奇怪的是,另一幅图像(在同一文档中)可以显示角度标记。我将在第一幅图像下方给出下一张图片的代码。有人能告诉我解决这个问题的方法吗?如果有的话,我错过了什么?

详细信息请访问:

  • 我用了\pgfplotsset{compat=1.17}
  • 都使用了\pgfplotsset{ticks=none}设置。(个人原因)
  • 背景颜色是黑色的文本是白色的

这是没有出现角度标记的图像,

...
\pgfplotsset{ticks=none}
...
\begin{document}
\begin{tikzpicture}[scale=.5][line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
\begin{axis}[
x=1.0cm,y=1.0cm,
axis lines=middle,
xlabel=$x$,
ylabel=$y$,
xmin=-7.2045675063146963,
xmax=5.420281689723229,
ymin=-8.835962675054054,
ymax=2.389508988491594,]
\clip(-7.2045675063146963,-8.835962675054054) rectangle (5.420281689723229,2.389508988491594);
\draw [shift={(0.8,-3.4)},line width=1.pt,color=qqwuqq,fill=qqwuqq,fill opacity=0.10000000149011612] (0,0) -- (-71.56505117707799:0.987578152218083) arc (-71.56505117707799:-26.565051177077986:0.987578152218083) -- cycle;
\draw [shift={(0.8,-3.4)},line width=1.pt,color=qqwuqq,fill=qqwuqq,fill opacity=0.10000000149011612] (0,0) -- (-116.56505117707799:0.987578152218083) arc (-116.56505117707799:-71.56505117707799:0.987578152218083) -- cycle;
\draw [line width=1.pt,domain=-7.2045675063146963:5.420281689723229] plot(\x,{(-5.--2.*\x)/1.});
\draw [line width=1.pt,domain=-7.2045675063146963:5.420281689723229] plot(\x,{(-1.-3.*\x)/1.});
\draw [line width=1.pt,domain=-7.2045675063146963:5.420281689723229] plot(\x,{(--6.--1.*\x)/-2.});                  
\draw[color=white] (-6.,0.25) node {$-6$};
\draw[color=white] (-0.3,-1.) node {$-1$};
\draw[color=white] (-0.3,-3.2) node {$-3$};
\draw[color=white] (-0.35,-5.) node {$-5$};
\node[color=white,rotate=-71.56505118] at (2.1,-6.6) {$3x + y + 1 = 0$};
\node[color=white,rotate=63.43494882] at (1.4,-1.6) {$y = 2x - 5$};
\draw[color=white] (1.2321540932847803,-3.8745390125525146) node {$\theta$};
\end{axis}
\end{tikzpicture}
\end{document}

以下是图像结果的快照

第一张图片

这是角度标记出现的地方

\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
\clip(-6.729809423412849,2.348340941072309) rectangle (3.9638031402979273,10.6029210327);
\draw [shift={(-6.,3.)},line width=1.pt,color=white,fill=qqwuqq,fill opacity=0.10000000149011612] (0,0) -- (0.:0.8) arc (0.:45.:0.8) -- cycle;
\draw [line width=1.pt] (-6.,7.)-- (1.,7.);
\draw [line width=1.pt] (1.,7.)-- (1.,3.);
\draw [line width=1.pt] (-6.,7.)-- (-6.,3.);
\draw [line width=1.pt] (-6.,3.)-- (1.,3.);
\draw [line width=1.pt] (-6.,3.)-- (1.,10.);
\draw [line width=1.pt] (-2.5,6.5)-- (1.,3.);
\draw [line width=1.pt] (1.,7.)-- (-0.5,8.5);
\draw [dashed, line width=1.pt] (1.,7.) -- (3.,5.);
\draw [dashed, line width=1.pt] (3.,5.) -- (1.,3.);
\draw [dashed, line width=1.pt] (1.,3.) -- (3.,3.);
\draw [fill=gray] (-6.,7.) circle (2.pt);
\draw[color=white] (-6.3,7.25) node {$D$};
\draw[color=white] (-6.3,2.7) node {$A$};
\draw [fill=gray] (-6.,3.) circle (2.pt);
\draw [fill=gray] (1.,3.) circle (2.pt);
\draw[color=white] (1.3,2.7) node {$B$};
\draw[color=white] (1.3,7.25) node {$C$};
\draw [fill=gray] (1.,7.) circle (2.pt);
\draw [fill=gray] (1.,10.) circle (2.pt);
\draw[color=white] (0.75,10.25) node {$E$};
\draw [fill=gray] (-2.5,6.5) circle (2.pt);
\draw[color=white] (-2.7,6.7) node {$P$};
\draw[color=white] (-5.48,3.22) node {$\alpha$};
\draw [fill=gray] (-0.5,8.5) circle (2.pt);
\draw[color=white] (-0.75,8.75) node {$Q$};
\draw[color=white] (3.3,5.) node {$P'$};
\draw[color=white] (3.3,3.) node {$B'$};
\end{tikzpicture}

这是第二张图片

第二张图片

$\alpha$我想要的角度标记是包含内部的圆弧

答案1

我认为你的问题可能是颜色。在第二幅图中,你明确地用白色画出了角度,但在第一幅图中却没有。

放置角度的方法有很多种。使用圆弧,就像您所做的那样;使用剪辑,如下例所示,使用角度库;等等。在这种情况下,剪辑非常简单。

这是我的例子。我改变了颜色和坐标,以避免输入太多数字:

\documentclass[border=2mm]{standalone}
\usepackage   {tikz}

\begin{document}
\begin{tikzpicture}[line cap=round]
\def\xmin{-7}
\def\xmax {5}
\def\ymin{-9}
\def\ymax {2}
\draw[thick,-latex] (\xmin,0) -- (\xmax,0) node[above left]  {$x$};
\draw[thick,-latex] (0,\ymin) -- (0,\ymax) node[below right] {$y$};
\clip (\xmin,\ymin) rectangle (\xmax,\ymax);
\draw[red] (-5,-15) -- (10,15) node[above, midway, shift={(-2,0)}, sloped] {$y=2x-5$};
\draw[red] (-5, 14) -- (5,-16) node[above, midway, shift={( 6,0)}, sloped] {$3x+y+1=0$};
\draw[red] (-8,  1) -- (8, -7);
\node at (-6,0) [above]      {$-6$};
\node at (0,-1) [left]       {$-1$};
\node at (0,-3) [below left] {$-3$};
\node at (0,-5) [left]       {$-5$};
% angle theta
\clip (8,-7) -- (0.8,-3.4) -- (5,-16);
\draw[blue] (0.8,-3.4) circle (0.6);
\node[blue] at (1.4,-4.1) {$\theta$};
\end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容