Posts

Showing posts from November 23, 2018

shading area between nodes

Image
up vote 3 down vote favorite I have drawn a graph with three vertices and want to shade the area between the edges following the edges 1 to 3 to 2 to 1. (code below) The first problem I get is with the curve (in red). Before the curve no problems, the second segment starts in 3 at a different point along the edge of 3. After the curve however in 2 the third segment starts at the position the second segment arrived. This I could patch by adding a extra position. Still the shading is not at the right position. documentclass{standalone} usepackage{tikz} begin{document} begin{tikzpicture}[scale=0.6] tikzstyle{knop}=[circle,minimum size=14,inner sep=0pt,draw] node[knop] (p1) at (0,1.2) {$1$} ; node[knop] (p2) at (-1.2,0) {$2$} ; node[knop] (p3) at (1.2,0) {$3$} ; %- loop is not a problem path [fill=lightgray,draw,loose