1

I would like a symmetrical arrow pointing to the other circle in this Venn diagram, but can't figure it out.

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{pgflibraryarrows}
\begin{document}

\begin{tikzpicture}
\tikzset{venn circle/.style={draw,circle,minimum 
width=6cm,fill=#1,opacity=0.4,text opacity=1}}

 \node [venn circle = gray] (A) at (0,0) {$Virginia$};
 %\node [venn circle = white] (B) at (60:4cm) {$Ohio$};
 \node [venn circle = gray] (C) at (0:5cm) {$Ohio$};
 %\node[left] at (barycentric cs:A=1/2,B=1/2 ) {}; 

 \node[below] at (barycentric cs:A=1/3 ) (endpoint) {};
 \node[below] at (barycentric cs:C=1/3 ) (endpoint) {};
 \draw[*-angle 60] 
 ( [yshift=-10pt] $ (A.south)!0.5!(C.south) $ ) node[anchor=north] {\{  
Virginia \emph{or} Ohio \}}
to[bend right,looseness=1.5] 
(endpoint.south east);


\end{tikzpicture}


\end{document}
  • 1
    Please make you example compilable. I get No shape named B is known.. – Peter Grill Mar 19 '16 at 1:21
  • Why is the node endpoint defined twice? you may have to change one of those to another name. – AJN Mar 19 '16 at 3:32
  • barycentric with only one point it's strange ! The code is too complicated ... – Alain Matthes Mar 19 '16 at 10:56
1

Something like this?

two arrows

The following has been edited to incorporate Alain Matthes's comments.

\documentclass[tikz,multi,border=10pt]{standalone}
\usetikzlibrary{calc,arrows.meta}% is the recommended library
\begin{document}
\begin{tikzpicture}
  [
    venn circle/.style={draw,circle,minimum width=6cm,fill=#1,opacity=0.4,text opacity=1},
    >/.tip={Straight Barb[angle=60:3pt 3]},
  ]

  \node [venn circle = gray] (A) at (0,0) {$Virginia$};
  %\node [venn circle = white] (B) at (60:4cm) {$Ohio$};
  \node [venn circle = gray] (C) at (0:5cm) {$Ohio$};
  %\node[left] at (barycentric cs:A=1/2,B=1/2 ) {};

  \node[below] at (A.center) (endpoint A) {};
  \node[below] at (C.center) (endpoint C) {};
  \node [circle, fill, minimum size=5pt, inner sep=0pt] (either) at ( [yshift=-10pt] $ (A.south)!0.5!(C.south) $ ) {};
  \draw[->] (either) to[bend right,looseness=1.5] (endpoint C.south east);
  \draw[->] (either) to[bend left,looseness=1.5] (endpoint A.south east);
  \node [anchor=north] at (either) {\{ Virginia \emph{or} Ohio \}};
\end{tikzpicture}
\end{document}
  • -angle 60 seems to be not defined in arrows.meta. I'm not sure of the utility of endpoint A and C. – Alain Matthes Mar 19 '16 at 11:00
  • That works. Thank you very much. Tikz is decidedly not my strong suit. – Linter Mar 19 '16 at 11:46
  • @AlainMatthes Do you know what the equivalent is? Usually, I just update the syntax, but in this case I wasn't sure what I was trying to do. About the endpoints, the lines need somewhere to point, correct? So you want something inside the circle and below the label. There are other ways to do it, of course. You could just use A.center and C.center with yshift or something. – cfr Mar 19 '16 at 13:57
  • @AlainMatthes I don't know what the barycentric does, though. – cfr Mar 19 '16 at 13:58
  • 1
    @cfr For the arrow I don't know because I have not yet read the new manual perhaps something like Triangle [angle = 60 ...] About endpoint I think that the center of circles are enough because the definition of endpoint with barycentric are wrong. Barycentric coordinates define a point from several points (>2) with coefficients ex A,.5 and B,.5 define the middle. Here endpoint is perhaps A ? – Alain Matthes Mar 19 '16 at 14:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.