答案1
你可以
- 用于
pgfplots
绘制带有网格、轴和带标签刻度的坐标系,无需绘制任何图 axis cs
通过坐标将文本放置为节点- 使用字体类型和大小的样式
例如:
\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}
答案2
有一点像Stefan 的回答但表中有(部分)数据:
\documentclass[tikz,border=5]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\pgfplotstableread{%
x y label
-37 13.25 school
-34 13.25 Agency
-33 14.00 body
-34 12.50 organisation
-34.5 12.00 organizations
-32 9.50 industry
-34 10.00 companies
-30 14.00 office
-34.5 12.75 agencies
-36.5 11.75 Association
-35.5 9.5 society
}\data
\begin{document}
\begin{tikzpicture}
\begin{axis}[axis y line=left, axis x line=bottom,
xmin=-38, xmax=-27, ymin=9, ymax=14.5,
every node near coord/.style={font=\sffamily}]
\addplot [only marks, nodes near coords, point meta=explicit symbolic]
table [x=x, y=y, meta=label] {\data};
\end{axis}
\end{tikzpicture}
\end{document}