[Tex/LaTex] How to draw texts within a cartesian coordinate system with TikZ

diagramstikz-pgf

I am new to TikZ and was wondering how to draw a simple figure as given below.

sample image

Best Answer

You could

  • use pgfplots for drawing coordinate system with grid, axis and ticks with labels, without drawing any plot
  • place the text as nodes via axis cs coordinates
  • use styles for font type and size

For example:

\documentclass[border=10pt]{standalone}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}[every node/.append style={font=\sffamily\footnotesize}]
  \begin{axis}[
      axis y line     = left,
      axis x line     = bottom,
      xtick           = {-37,-36,...,-29},
      ytick           = {9,9.5,...,14},
      ticklabel style = {font = \sffamily\footnotesize},
      grid,
      grid style = {color=gray!50, dotted},
      xmin       = -38,   xmax = -28,
      ymin       = 9,     ymax = 14,
    ]      
    \node at (axis cs:-34,10)   {companies};
    \node at (axis cs:-32,12)   {institutions};
    \node at (axis cs:-34,13.4) {Agency};
    \node at (axis cs:-37,13)   {schools};
  \end{axis}
\end{tikzpicture}
\end{document}

Plot

Related Question