|
| 1 | +\begin{tikzpicture} |
| 2 | + |
| 3 | +\definecolor{color0}{rgb}{1,1,0} |
| 4 | +\definecolor{color1}{rgb}{0.12156862745098,0.466666666666667,0.705882352941177} |
| 5 | +\definecolor{color2}{rgb}{0.5,0.3,0.8} |
| 6 | + |
| 7 | +\begin{groupplot}[group style={group size=1 by 3}] |
| 8 | +\nextgroupplot[ |
| 9 | +tick align=outside, |
| 10 | +tick pos=left, |
| 11 | +x grid style={white!69.01960784313725!black}, |
| 12 | +xmin=0.41, xmax=4.59, |
| 13 | +xtick style={color=black}, |
| 14 | +y grid style={white!69.01960784313725!black}, |
| 15 | +ymin=0, ymax=10.5, |
| 16 | +ytick style={color=black} |
| 17 | +] |
| 18 | +\draw[draw=black,fill=red,postaction={pattern=north east lines}] (axis cs:0.6,0) rectangle (axis cs:1.4,1); |
| 19 | +\draw[draw=black,fill=red,postaction={pattern=north east lines}] (axis cs:1.6,0) rectangle (axis cs:2.4,2); |
| 20 | +\draw[draw=black,fill=red,postaction={pattern=north east lines}] (axis cs:2.6,0) rectangle (axis cs:3.4,3); |
| 21 | +\draw[draw=black,fill=red,postaction={pattern=north east lines}] (axis cs:3.6,0) rectangle (axis cs:4.4,4); |
| 22 | +\draw[draw=black,fill=blue,postaction={pattern=north east lines}] (axis cs:0.6,1) rectangle (axis cs:1.4,7); |
| 23 | +\draw[draw=black,fill=blue,postaction={pattern=north east lines}] (axis cs:1.6,2) rectangle (axis cs:2.4,8); |
| 24 | +\draw[draw=black,fill=blue,postaction={pattern=north east lines}] (axis cs:2.6,3) rectangle (axis cs:3.4,9); |
| 25 | +\draw[draw=black,fill=blue,postaction={pattern=north east lines}] (axis cs:3.6,4) rectangle (axis cs:4.4,10); |
| 26 | + |
| 27 | +\nextgroupplot[ |
| 28 | +tick align=outside, |
| 29 | +tick pos=left, |
| 30 | +x grid style={white!69.01960784313725!black}, |
| 31 | +xmin=0.41, xmax=4.59, |
| 32 | +xtick style={color=black}, |
| 33 | +y grid style={white!69.01960784313725!black}, |
| 34 | +ymin=0, ymax=10.5, |
| 35 | +ytick style={color=black} |
| 36 | +] |
| 37 | +\draw[draw=black,fill=color0,postaction={pattern=horizontal lines}] (axis cs:0.6,0) rectangle (axis cs:1.4,1); |
| 38 | +\draw[draw=black,fill=color0,postaction={pattern=grid}] (axis cs:1.6,0) rectangle (axis cs:2.4,2); |
| 39 | +\draw[draw=black,fill=color0,postaction={pattern=crosshatch}] (axis cs:2.6,0) rectangle (axis cs:3.4,3); |
| 40 | +\draw[draw=black,fill=color0,postaction={pattern=north west lines}] (axis cs:3.6,0) rectangle (axis cs:4.4,4); |
| 41 | +\draw[draw=none,fill=green!50.19607843137255!black,postaction={pattern=fivepointed stars}] (axis cs:0.6,1) rectangle (axis cs:1.4,7); |
| 42 | +\draw[draw=none,fill=green!50.19607843137255!black,postaction={pattern=sixpointed stars}] (axis cs:1.6,2) rectangle (axis cs:2.4,8); |
| 43 | +\draw[draw=none,fill=green!50.19607843137255!black,postaction={pattern=bricks}] (axis cs:2.6,3) rectangle (axis cs:3.4,9); |
| 44 | +\draw[draw=none,fill=green!50.19607843137255!black,postaction={pattern=crosshatch dots}] (axis cs:3.6,4) rectangle (axis cs:4.4,10); |
| 45 | + |
| 46 | +\nextgroupplot[ |
| 47 | +legend cell align={left}, |
| 48 | +legend style={fill opacity=0.8, draw opacity=1, text opacity=1, draw=white!80.0!black}, |
| 49 | +tick align=outside, |
| 50 | +tick pos=left, |
| 51 | +x grid style={white!69.01960784313725!black}, |
| 52 | +xmin=0, xmax=6, |
| 53 | +xtick style={color=black}, |
| 54 | +y grid style={white!69.01960784313725!black}, |
| 55 | +ymin=0, ymax=2.5, |
| 56 | +ytick style={color=black} |
| 57 | +] |
| 58 | +\path [draw=black, postaction={pattern=north west lines}] |
| 59 | +(axis cs:1,1) |
| 60 | +--(axis cs:3,1) |
| 61 | +--(axis cs:3,2) |
| 62 | +--(axis cs:1,2) |
| 63 | +--cycle; |
| 64 | +\addlegendimage{area legend, draw=black, postaction={pattern=north west lines}} |
| 65 | +\addlegendentry{Square} |
| 66 | + |
| 67 | +\path [draw=black, postaction={pattern=north east lines, pattern color=color2, fill opacity=0.7}] |
| 68 | +(axis cs:0,0) |
| 69 | +--(axis cs:4,1.1) |
| 70 | +--(axis cs:6,2.5) |
| 71 | +--(axis cs:2,1.4) |
| 72 | +--cycle; |
| 73 | +\addlegendimage{area legend, draw=black, postaction={pattern=north east lines, pattern color=color2, fill opacity=0.7}} |
| 74 | +\addlegendentry{Polygon} |
| 75 | + |
| 76 | +\draw[draw=none,fill=color1,postaction={pattern=fivepointed stars}] (axis cs:4,1.5) ellipse (2 and 0.25); |
| 77 | +\addlegendimage{area legend, draw=none, fill=color1, postaction={pattern=fivepointed stars}} |
| 78 | +\addlegendentry{Ellipse} |
| 79 | + |
| 80 | +\end{groupplot} |
| 81 | + |
| 82 | +\end{tikzpicture} |
0 commit comments