  A graph $G$ is semilinear of complexity $t$ if the vertices of $G$ are
elements of $\mathbb{R}^{d}$ for some $d\in\mathbb{Z}^{+}$, and the edges of
$G$ are defined by the sign patterns of $t$ linear functions
$f_1,\dots,f_t:\mathbb{R}^{d}\times \mathbb{R}^{d}\rightarrow\mathbb{R}$. We
show that semilinear graphs of constant complexity have very tame Ramsey
properties. More precisely, we prove that if $G$ is a semilinear graph of
complexity $t$ which contains no clique of size $s$ and no independent set of
size $n$, then $G$ has at most $O_{s,t}(n)\cdot(\log n)^{O_t(1)}$ vertices. We
also show that the logarithmic term cannot be omitted. In particular, this
implies that if $G$ is a semilinear graph of constant complexity on $n$
vertices, and $G$ contains no clique of size $s$, then $G$ can be properly
colored with $\mbox{polylog}(n)$ colors. In the past 60 years, this coloring
question was extensively studied for several special instances of semilinear
graphs, e.g. shift graphs, intersection and disjointness graphs of certain
geometric objects, and overlap graphs. Our main result provides a general upper
bound on the chromatic number of all such, seemingly unrelated, graphs.
  Furthermore, we consider the symmetric Ramsey problem for semilinear graphs
as well. It is known that if there exists an intersection graph of $N$ boxes in
$\mathbb{R}^{d}$ (such graphs are semilinear of complexity $2d$) that contains
no clique or independent set of size $n$, then $N=O_d(n^2(\log n)^{d-1})$. That
is, the exponent of $n$ does not grow with the dimension. We prove a result
about the symmetric Ramsey properties of semilinear graphs, which puts this
phenomenon in a more general context.
