我有以下代码:
\documentclass{article}
\usepackage{tikz,pgfplots}
\begin{document}
\begin{tikzpicture}[xscale=2]
@Axes
\draw (0.05,-0.2) node[left]{\textcolor{gray}{O}};
\draw[thick, color=gray,->] (-1.5,0) -- (3,0) node[right] {\textcolor{black}{$x$}};
\draw[thick, color=gray, ->] (0,-1.5) -- (0,5) node[above] {\textcolor{black}{$f(x)$}};
@Plot
\draw [red, thick, domain=-1.2:2.5, samples=100] plot(\x, {((\x)+1});
\draw [blue, thick, domain=-0.7:2, samples=100] plot(\x, {(3-2*(\x)});
@LoS and Labels
\draw[gray, dashed] (2/3,0)--(2/3,5/3);
\node[circle,fill=black,inner sep=0pt,minimum size=3pt,label=below:{$\frac{3}{2}$}] (a) at (2/3,0) {};
\node[circle,color=black, fill=white, inner sep=0pt,minimum size=5pt,label=below right:{}] (b) at (2/3,5/3) {};
\end{tikzpicture}
\end{document}
我想要获取相交线中间的一个节点,该节点是一个带有黑色边框的白色圆圈(显示该点被排除的气泡)。我该怎么做?
答案1
你只是想要这个吗?
\documentclass[tikz,border=10pt]{standalone}
\begin{document}
\begin{tikzpicture}[xscale=2]
\draw (0.05,-0.2) node[left, text=gray]{O};
\draw [thick, draw=gray, ->] (-1.5,0) -- (3,0) node[right, black] {$x$};
\draw [thick, draw=gray, ->] (0,-1.5) -- (0,5) node[above, black] {$f(x)$};
\draw [red, thick, domain=-1.2:2.5, samples=100] plot(\x, {((\x)+1});
\draw [blue, thick, domain=-0.7:2, samples=100] plot(\x, {(3-2*(\x)});
\draw[gray, dashed] (2/3,0)--(2/3,5/3);
\node[circle,fill=black,inner sep=0pt,minimum size=3pt,label=below:{$\frac{3}{2}$}] (a) at (2/3,0) {};
\node[circle,draw=black, fill=white, inner sep=0pt,minimum size=5pt] (b) at (2/3,5/3) {};
\end{tikzpicture}
\end{document}