I would like to draw the following figure, but I don't even know where to begin. This goes far beyond my tikz expertise. If anyone can help, I would appreciate it very much. Here is a skeleton code to get the rectangle going:



\node[rectangle,draw,minimum width=2in,minimum height=2in,thick,text width=2in] (box1) {Type-B adaptable\\Type-B adaptable\\Type-C robust\\Type-B adaptable\\Type-A robust\\Type-A adaptable\\Type-B adaptable\\Type-C adaptable};


enter image description here

  • You could at least post code for the rectangle with some nodes containing the text inside. – cfr Aug 21 '14 at 23:53
  • I can certainly post the code for the rectangle, but the real problem is that I do not know how to construct "some nodes containing the text inside" -- that is why I am asking for help. – ozsu Aug 22 '14 at 0:14
  • 3
    Right now, you require anybody who wants to help to start with \documentclass and do all the laborious setting up of the basic structure of the document. You are making it more effortful to help you in ways which people will know are quite unnecessary since you could very easily do that part for yourself. Just type the text you want in nodes somewhere even if they aren't in the rectangle. Don't make people copy from your image. That's tedious and error-prone. – cfr Aug 22 '14 at 0:17
  • 1
    Fair enough -- did not think that sufficiently I suppose. I have created a sample with the rectangle and the text. Thanks for the advice. – ozsu Aug 22 '14 at 0:26
  • OK. Could you say what you aren't sure about? I guess you know how to draw curves and lines (based on your previous questions) and how to put text in nodes. I guess I'm a bit unsure what you're stuck on and need help with. – cfr Aug 22 '14 at 1:51

This is one solution. The curves are drawn via

draw[] (A).. controls (B) .. (C); draw[] (C) to[out=xx,in=yy] (E);

and the shaded line areas are done via clip skill with scope environment. Further the text are place via tikz node. Several style macros were predefined including the B/W shading.

enter image description here




\tikzset{rec/.style={thick,text width=2cm,font=\bfseries\large,align=left, text opacity=1},
line/.style={dashed, line width=2pt},
sharea/.style={shade, left color=gray!50, right color=white} % B/W shading
\path[sharea](-0.2,-0.2) rectangle (5.2,5.2);
\draw[line width=2pt] (0,0) rectangle (5,5);
% north west lines area
\fill[pattern=north west lines,opacity=0.2] (1.8,3.8) to [out=-120,in=90] (2.5,0)--(0,0)--(0,3); % blue line to the left
\fill[pattern=north west lines,opacity=0.2] (0,5)--(3.7,5).. controls (3,2.5) .. (0,1.5)-- cycle; % Yellow line to the left
\fill[white] (3,5) to[out=-135,in=15] (1.8,3.8) to [out=-200, in=35] (0,3.4) --(0,5)--(3,5); 
\path[sharea] (3,5) to[out=-135,in=15] (1.8,3.8) to [out=-200, in=35] (0,3.4) --(0,5)--(3,5); 
\path[clip] (1.8,3.8) to[out=-120,in=90](2.5,0)--(0,0)--(0,5)--(3,5)--cycle; 
\fill[white] (3.7,5).. controls (3,2.5) .. (0,1.5)-- (0,5); 
\path[sharea] (3.7,5).. controls (3,2.5) .. (0,1.5)-- (0,5);left

%\path[draw] (0,0) grid (5,5);

\draw[line] (3,5) to[out=-135,in=15](1.8,3.8) to [out=-200, in=35] (0,3.4);
\draw[line] (1.8,3.8) to[out=-120,in=90](2.5,0);
\draw[line] (3.7,5).. controls (3,2.5) .. (0,1.5);
\draw[line] (5,2.5) to[out=-180,in=10] (2.6,2.6);
\draw[line] (4.2,2.5) to[out=-90,in=90] (4,0);
\draw[line] (4,1) to[out=160,in=0] (2.3,1);

% node to place text
\node[rec] at (1.2,0.8)           {Type-A, \\ robust};
\node[rec] at (2.5,3.3)           {Type-C, \\ robust};
\node[rec] at (3,1.8)             {Type-A, \\ adaptable};
\node[rec] at (1,4.5)             {Type-B, \\ adaptable};
\node[rec,rotate=40] at (0.8,2.5) {Type-B, \\ adaptable};
\node[rec,rotate=40] at (4.2,4)   {Type-B, \\ adaptable};
\node[rec] at (3.2,0.5)           {Type-B, \\ adaptable};
\node[rec,rotate=80] at (4.5,1)   {Type-C, \\ adaptable};
  • Thank you very much for this; this is great. The ode has a lot of stuff that I will study -- it will teach me greatly. Thanks again. – ozsu Aug 22 '14 at 10:40
  • @ozsu you are welcome. Glad it helps. – Jesse Aug 22 '14 at 10:56

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.