【有識者求】tikzのanglesライブラリで,ラベルの位置をもう少し回転させてずらすオプションってあったりしますか…? pic.twitter.com/ZCeDuZ8gNo
— ばばちゃん (@sykm_pzp) April 15, 2025
ラベルには中かっこ({…})でオプションを追加できます。
\documentclass[tikz,border=10pt]{standalone}
\usetikzlibrary{angles,quotes}
\begin{document}
\begin{tikzpicture}[every node/.style = {font = \scriptsize}]
% Axes
\draw[-stealth] (-1.2,0) -- (2.2,0) node[right] {$x$};
\draw[-stealth] (0,-1.2) -- (0,1.5) node[above] {$y$};
% Circle
\draw circle(1);
% Labels
\node at (1.1,0) [below] {1};
\node at (0.2,1.15) {1};
\node at (2,0) [below] {2};
\node at (0.2,0) [below] {0};
% Line from origin to (2,1)
\draw (-1.2,-0.6) -- (2,1);
% Dashed projection lines
\draw[dashed] (2,1) -- (2,0);
\draw[dashed] (2,1) -- (0,1);
\coordinate (0) at (0,0);
\coordinate (A) at (0.2,0);
\coordinate (B) at (-0.2,-0.1);
% Angle arc with label
\pic[draw, -stealth, "$\theta$"{shift = (20:-0.20)},
angle radius = 8, angle eccentricity = 1.3]
{angle = A--0--B};
\end{tikzpicture}
\end{document}Xで@TeXgalleryフォローしてね〜(^▽^)
See also: Original Source by Stefan Kottwitz
Note: The copyright belongs to the blog author and the blog. For the license, please see the linked original source blog.
Leave a Reply
You must be logged in to post a comment.