1

I'm trying to do some graph similar to the following in TiKZ (I'm a very basic user) and I'm having some problems:

Example

Code:

\documentclass[tikz,border=2mm]{standalone}
\begin{document}
\begin{tikzpicture}
\draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
\draw[->,ultra thick] (-5,0)--(5,0) node[right]{High Price};
\draw[->,ultra thick] (0,-5)--(0,5) node[above]{High Quality};

\end{tikzpicture}
\end{document}

I have gotten to obtain the axis (which are black, just normal axis). However, I don't know how to place the labels in the right position.

Furthermore, I need to write other names instead of Brand A, Brand B, etc. These names are longer and I would like to write them with a break in two lines for not using too much horizontal space. The letters do not have to be blue with white filling (just the regular LaTeX font).

  • Can you show what you try so far? Developing code from scratch is like request do-it-instead-me ... – Zarko Apr 17 '16 at 13:36
  • @Zarko: Yes, sorry! I just added the code so far. – Airman01 Apr 17 '16 at 13:47
4

Try:

\documentclass[tikz,border=2mm]{standalone}
\usetikzlibrary{arrows.meta}
\begin{document}
\begin{tikzpicture}[
 line/.style = {draw=blue!50!gray!25, line width=3mm, 
                {Triangle[length=6mm,width=9mm]}-{Triangle[length=6mm,width=9mm]}},
brand/.style = {font=\Large\bfseries, text=blue!20!black!60, 
                align=left, anchor=west}
                    ]
\draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
\draw[line] (-5,0) node[left]{Low Price} 
                    --(5,0) node[right]{High Price};
\draw[line] (0,-5) node[below]{Low Quality}
                    --(0,5) node[above]{High Quality};
%
\node[brand] at (-5,-3) {Brand E};
\node[brand] at (-3,-2) {Brand D};
\node[brand] at ( 1, 1) {Brand B};
\node[brand] at ( 3, 3) {Brand A\\ Brand C};
\end{tikzpicture}
\end{document}

Images is similar to picture you provide, however differences are in shadows of axes and in fonts for text in picture:

enter image description here

Eddit: shadows of coordinate axes can be simulated with drawing them twice, slightly shifted:

\documentclass[tikz,border=2mm]{standalone}
\usetikzlibrary{arrows.meta}

\begin{document}
\begin{tikzpicture}[
 line/.style = {draw=#1, line width=3mm,
                {Triangle[length=6mm,width=9mm]}-{Triangle[length=6mm,width=9mm]},
                },
brand/.style = {font=\Large\bfseries, text=blue!20!black!60,
                align=left, anchor=west}
                    ]
\draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
\draw[line=gray,yshift=-1pt,xshift=1pt]  (-5,0) edge (5,0)
                                            (0,-5)  to  (0,5);
\draw[line=blue!50!gray!25]
    (-5,0) node[left]{Low Price} --(5,0) node[right]{High Price};
\draw[line=blue!50!gray!25]
    (0,-5) node[below]{Low Quality} --(0,5) node[above]{High Quality};
%
\node[brand] at (-5,-3) {Brand E};
\node[brand] at (-3,-2) {Brand D};
\node[brand] at ( 1, 1) {Brand B};
\node[brand] at ( 3, 3) {Brand A\\ Brand C};
\end{tikzpicture}
\end{document}

This gives:

enter image description here

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.