11

I have the following code:

\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}

and I want to get a node in the middle of the intersecting line which is a white circle with a black border (a bubble which shows the point is excluded). How can I do this?

4
  • 1
    if you want a black border on your last node use draw=black (I'm not sure I understand the question completely)
    – d-cmst
    Dec 7, 2015 at 23:29
  • Please don't use minimal for examples - it is not suitable.
    – cfr
    Dec 7, 2015 at 23:51
  • Like Domenico said, use the command draw (specifying black in this case is unnecessary), and remove the option color=black.
    – Alenanno
    Dec 7, 2015 at 23:54
  • (La)TeX uses % to start a comment... The @... lines in your code are not comments. Dec 8, 2015 at 10:29

1 Answer 1

15

Do you just want this?

bubble

\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}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .