我试图在 tikz 中计算弧线末端的坐标,但似乎有一个我无法修复的错误。有什么想法吗?提前谢谢!
\documentclass[a4paper, 11 pt]{article}
\usepackage[dvipsnames,svgnames, x11names]{xcolor}
\usepackage{tikz}
\usepackage{pgfplots}
\usetikzlibrary{arrows,calc}
\begin{document}
\begin{figure}[t]
\begin{tikzpicture}[scale=1.6, >=latex']
\draw[->] (-1.5,0)--(2.5,0) node[anchor=north] {$x$};
\draw[->] (-1.5,0)--(-1.5,3.5);
\draw[Honeydew4,thick] (-1.5, 0) arc (180:160:3);
\fill [red] ($(-1.5,0) + (-3*cos(20),sin(20))$) circle (2pt);
\end{tikzpicture}
\end{figure}
\end{document}
答案1
这里最简单的解决方案就是给坐标命名,以便您可以引用它:
\PassOptionsToPackage{rgb,x11names,svgnames,dvipsnames}{xcolor}
\documentclass[tikz,border=5pt,multi]{standalone}
\usetikzlibrary{arrows}
\begin{document}
\begin{tikzpicture}[scale=1.6, >=latex']
\draw[->] (-1.5,0)--(2.5,0) node[anchor=north] {$x$};
\draw[->] (-1.5,0)--(-1.5,3.5);
\draw[Honeydew4,thick] (-1.5, 0) arc (180:160:3) coordinate (c);
\fill [red] (c) circle (2pt);
\end{tikzpicture}
\end{document}