Ich möchte eine Schnittmenge farbig hervorgeben. Die beiden Mengenellipsen sind aus einem Open in Online-Editor
\documentclass[]{article} \usepackage[utf8]{inputenc} \usepackage{tikz} \usetikzlibrary{fit,shapes,backgrounds} \begin{document} \begin{tikzpicture} \node (3) at (-1,0) {$3$}; \node (1) at (-1,1) {$1$}; \node (5) at (0,0.5) {$5$}; \node (2) at (2,0) {$2$}; \node (4) at (2,1) {$4$}; \node (6) at (3,0.5) {$6$}; \node (8) at (5,1) {$8$}; \node (10) at (5,0) {$10$}; \node[draw,inner sep=0pt,thick,ellipse,fit=(1) (2) (3) (5) (6),label={[label distance=-1.5mm]135:$A$}] {}; \node[draw,inner sep=0pt,thick,ellipse,fit=(2) (4) (6) (8) (10),label={[label distance=-1.5mm]20:$B$}] {}; \begin{scope}[on background layer] \clip node[inner sep=0pt,thick,ellipse,fit=(1) (2) (3) (5) (6)] {}; \node[fill,blue!50,inner sep=0pt,thick,ellipse,fit=(2) (4) (6) (8) (10)] {}; \end{scope} \end{tikzpicture} \end{document} Wie bekomme ich das Clipping hin, so dass nur die Schnittmenge gefärbt wird? gefragt 10 Mär '16, 20:11 tom75 |
Du kannst die Option Open in Online-Editor
\documentclass[]{article} \usepackage[utf8]{inputenc} \usepackage{tikz} \usetikzlibrary{fit,shapes,backgrounds} \begin{document} \begin{tikzpicture} \node (3) at (-1,0) {$3$}; \node (1) at (-1,1) {$1$}; \node (5) at (0,0.5) {$5$}; \node (2) at (2,0) {$2$}; \node (4) at (2,1) {$4$}; \node (6) at (3,0.5) {$6$}; \node (8) at (5,1) {$8$}; \node (10) at (5,0) {$10$}; \begin{scope}[on background layer] \node[draw,inner sep=0pt,thick,ellipse,fit=(1) (2) (3) (5) (6),label={[label distance=-1.5mm]135:$A$}, path picture={\node[fill,blue!50,inner sep=0pt,ellipse,fit=(2) (4) (6) (8) (10)] {};} ] {}; \end{scope} \node[draw,inner sep=0pt,thick,ellipse,fit=(2) (4) (6) (8) (10),label={[label distance=-1.5mm]20:$B$}] {}; \end{tikzpicture} \end{document} beantwortet 10 Mär '16, 21:28 esdd Super, vielen Dank!
(10 Mär '16, 23:56)
tom75
|