Is it possible to put an outline line or borderline can be made here to make a black line around the yellow, red, and blue shapes? (ie draw,thick line around the edge)

\usetikzlibrary{shapes,backgrounds,shapes.misc, positioning,shapes.geometric,arrows,matrix,fit,calc}
        isosceles triangle,
        isosceles triangle apex angle=66,
        shape border rotate=90,
        node distance=5cm,
        rounded corners=60pt,
        minimum height=6cm

 \tikzset{venn circle/.style={circle,minimum width=9mm,fill=#1,opacity=0.6}}

\node at (0,0) {A};
\node (ABC) at (0,-2        ) {ABC};
\node (B) at (-2,-3) {B};
\node (AB) at (-1,-1.5) {AB};
\node (AC) at (1,-1.5) {AC};
\node (BC) at (0,-3) {BC};
\node (C) at (2,-3) {C};

\node[buffer]at (0,-1.9){};

\draw [line width=35pt,opacity=0.6,blue,line cap=round,rounded corners] (A.center) -- (AC.center) -- (C.center);
\draw [line width=35pt,opacity=0.6,yellow,line cap=round,rounded corners] (C.center) -- (BC.center) -- (B.center);
\draw [line width=35pt,opacity=0.6,red,line cap=round,rounded corners] (A.center) -- (AB.center) -- (B.center);

\node[venn circle = green, thick] at (0,0) {A};
\node (ABC) at (0,-2        ) {ABC};
\node[venn circle = green, thick] (B) at (-2,-3) {B};
\node (AB) at (-1,-1.5) {AB};
\node (AC) at (1,-1.5) {AC};
\node (BC) at (0,-3) {BC};
\node[venn circle = green, thick]  (C) at (2,-3) {C};


My attempt only looks like this: my attempt

but I want something more like this (but this looks messy and bad): want like


Well, slightly modified answer on your question How to create enter link around two nodes .... I further simplify my code, and add options for coloring links between nodes. Links are designed as nodes. This allows to have border of links in different color as the fills are.



         vc/.style = {%venn circle
    circle, draw, thick, fill=#1,
                      minimum width=9mm, opacity=0.6},
   vg/.style args = {#1/#2}{%venn group
    minimum height=11mm,
    minimum width=#1+\pgfkeysvalueof{/pgf/minimum height},
    draw, rounded corners=\pgfkeysvalueof{/pgf/minimum height}/2, 
    fill=#2!40, opacity=0.6,

\node (A) [vc=green]  at (0,0)    {A};
\node (B) [vc=green]  at (-2,-3)  {B};
\node (C) [vc=green]  at (2,-3)   {C};
\node (ABC) at (0,-2)       {ABC};
\node (AB)  at (-1,-1.5)    {AB};
\node (AC)  at (1,-1.5)     {AC};
\node (BC)  at (0,-3)       {BC};
\path   let \p1 = ($(A.center)-(B.center)$),
            \n1 = {veclen(\y1,\x1)} in
            (A) -- node[vg=\n1/blue] {} (B);
\path   let \p2 = ($(A.center)-(C.center)$),
            \n2 = {veclen(\y2,\x2)} in
            (A) -- node[vg=\n2/red] {} (C);
\path   let \p3 = ($(B.center)-(C.center)$),
            \n3 = {veclen(\y3,\x3)} in
            (B) -- node[vg=\n3/yellow] {} (C);
\draw[line width=16mm, draw=blue!20,fill=blue!20,rounded corners]
    (A.center)  -- (B.center) -- (C.center) -- cycle;

enter image description here

Edit: In comparison to your MWE, in above example are the following changes

  • image is drawn on the three layers; so the transparency is necessary only for links which are on the main layer
  • nodes are on the front
  • triangle is on background layer

  • for all image elemnt are defined styles; with this becomes code quit shorter

  • all nodes are set only ones
  • for links are used nodes, which is oriented by path beween linked nodes. For this is necessary to measure nodes width
  • instead of blue triangle defined as buffer I simply draw lines with adequate with and with same color as has fill
  • for fonts I useonly \sffamily, \sansmath cause error

Addendum: To make border line around "blue" triangle, you can help yourself with adding one more line around nodes:

\draw[line width=16.4mm, rounded corners]% <--- added for black borders
    (A.center)  -- (B.center) -- (C.center) -- cycle;
\draw[line width=16mm, draw=blue!20,fill=blue!20,rounded corners]
    (A.center)  -- (B.center) -- (C.center) -- cycle;

Result with this is:

enter image description here

  • Thanks! this is perfect. Much better than my hackish attempt – jjdd Mar 4 '16 at 3:02
  • I'm glad that you liked this answer. I will add some more explanation what I do, so it will be worth to check answer after while again. – Zarko Mar 4 '16 at 3:04
  • actually, one point: is there a way to make an outline line around the surrounding light blue triangle shape? – jjdd Mar 4 '16 at 3:11
  • As solution temporary is, not or at least is not straightforward. I will see, what I can do. – Zarko Mar 4 '16 at 3:18
  • I really appreciate it! I have a lot to learn about tikz – jjdd Mar 4 '16 at 3:44

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.