Just wonder if this could be done with tikz? I know I should provide at least a MWE, but I am new to latex and have absolutely no idea where to start.

enter image description here

MWE (Addition by HK)

  %% fill styles if needed

    \node (a) at (0,0)  {a};
  • This can certainly be done by hand (meaning defining all the lines explicitly, etc.) with a lot of work. There are ways of doing bar charts with pgfplots. You might be able to build up from there. See this example: tex.stackexchange.com/questions/185136/… – Miguel Aug 28 '14 at 6:55
  • 3
    It's a pretty useless plot, since you cannot easily compare the different values. – Alex Aug 29 '14 at 17:15

Here's a rough approximation...I didn't try to replicate the numbers in the MWE and haven't finetuned the details.

enter image description here

Here's the code:


% \Yvalue{x-coordinate}{y-coordinate}{colour}

  \foreach \x in {0,4,8} {
    \draw[pattern=north east lines, pattern color=blue!10]
  \foreach \x in {0,2,4,6} {
  \foreach \y in {0,2,4,6} {
  \foreach \y/\txt [count=\x]
    in {3/Label 1, 4/Label 2, 1/Label 3, 5/Label 4,6/Label 5} {
    \drawYvalue{2*\x-0.5}{\y}{\ifodd\x yellow\else green\fi}
    \begin{scope}[canvas is zx plane at y=0]
      \node[transform shape,rotate=180] at (3,2*\x-1)[anchor=west,align=right]{\txt};


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.