  An $r$-quasiplanar graph is a graph drawn in the plane with no $r$ pairwise
crossing edges. Let $s \geq 3$ be an integer and $r=2^s$. We prove that there
is a constant $C$ such that every $r$-quasiplanar graph with $n \geq r$
vertices has at most $n\left(Cs^{-1}\log n\right)^{2s-4}$ edges.
  A graph whose vertices are continuous curves in the plane, two being
connected by an edge if and only if they intersect, is called a string graph.
We show that for every $\epsilon>0$, there exists $\delta>0$ such that every
string graph with $n$ vertices, whose chromatic number is at least
$n^{\epsilon}$ contains a clique of size at least $n^{\delta}$. A clique of
this size or a coloring using fewer than $n^{\epsilon}$ colors can be found by
a polynomial time algorithm in terms of the size of the geometric
representation of the set of strings.
  In the process, we use, generalize, and strengthen previous results of Lee,
Tomon, and others. All of our theorems are related to geometric variants of the
following classical graph-theoretic problem of Erdos, Gallai, and Rogers. Given
a $K_r$-free graph on $n$ vertices and an integer $s<r$, at least how many
vertices can we find such that the subgraph induced by them is $K_s$-free?
