I'm working with anonymization and the GDA-Score. For a paper I wanted to make the following plots:

enter image description here

Can someone help me getting such a coordinate system with charts? So far I was only able to get a chart diagram in a box using tikz and pgfplots without a y-axis separating two areas. I also looked into the documentation, but that didn't help me. This is my first time creating charts (I only created function plots so far), and I hope I will learn something!

  • Any meaning for the numbers in your diagram? – Black Mild Jun 4 at 11:50
  • It's important, that they are there, but they do not affect the size of the bar. – Titanlord Jun 4 at 12:03

One simple way is drawing as it is. I hope the code is self-explained.

enter image description here

\foreach \i/\j/\col/\lw/\itextB/\itextA in {
\draw[color=\col,line width=\lw] (\i-.3,0)--+(90:-\j);
(\i-.3,0)   node[above=1mm,scale=.9]{\itextA}
(\i-.3,-\j) node[above,scale=.7]{\itextB};      
\draw[thick] (-3,0)--(5.5,0) 
(0,-2) node[below]{bad} -- (0,2) node[above]{good};
  • Ah I see, you simply skipped pgfplots and just did it in tikz. I thought it would be easier with pgfplots, but thats also very good. Thank you for the answer! – Titanlord Jun 4 at 14:57
  • 1
    @Titanlord I see that pgfplots is powerful. However, it is too hard for me to remember a lot of option names, so I often use basic commands of plain TikZ. – Black Mild Jun 4 at 18:35

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.