I would like to plot a graph that does not really plot any values, and it is just a symbolic representation of two properties (x & y) of four different classes (A to D).

I would like it to look like this:

What I am seeking

The text is meant to be different than this, including the axis titles.

Is this possible to do? I have looked for similar things in pgfplots, but did not manage to find anything quite like this...

Thanks in advance for all the help!

  • You don’t need the full power of pgfplots if all you want is axes. TikZ would be more than enough. Commented May 11, 2020 at 14:19

2 Answers 2


This can be achieved by using tikz only.



\draw[->] (-4,0) -- (4,0) node[anchor=west] {$x$};
\draw[->] (0,-4) -- (0,4) node[anchor=south east] {$y$};
\node[draw,inner sep=4em] at (2, 2) {B};
\node[draw,inner sep=4em] at (-2, 2) {A};
\node[draw,inner sep=4em] at (-2, -2) {C};
\node[draw,inner sep=4em] at (2, -2) {D};


enter image description here


Using the matrix of nodes approach

enter image description here

        \matrix (mymatrix) [
            matrix of nodes,
            row sep = 1em,
            column sep = 1em,
                rectangle, draw=black, minimum height=1.25em, minimum width=1.25em,
                inner sep=0pt, outer sep=0pt
        ] {
            A & B \\
            C & D \\
    ([yshift=1ex] $(mymatrix-1-1.north east)!0.5!(mymatrix-1-2.north west)$) node[above]{$y$} --
    ([yshift=-1ex]$(mymatrix-2-1.south east)!0.5!(mymatrix-2-2.south west)$)
    ([xshift=1ex] $(mymatrix-1-2.south east)!0.5!(mymatrix-2-2.north east)$) node[right]{$x$} --
    ([xshift=-1ex]$(mymatrix-1-1.south west)!0.5!(mymatrix-2-1.north west)$)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .