  A sandpile is a cellular automaton on a graph that evolves by the following
toppling rule: if the number of grains at a vertex is at least its valency,
then this vertex sends one grain to each of its neighbors.
  In the study of pattern formation in sandpiles on large subgraphs of the
standard square lattice, S. Caracciolo, G. Paoletti, and A. Sportiello
experimentally observed that the result of the relaxation of a small
perturbation of the maximal stable state contains a clear visible thin balanced
graph formed by its deviation (less than maximum) set. Such graphs are known as
tropical curves.
  During the early stage of our research, we have noticed that these tropical
curves are approximately scale-invariant, that is the deviation set mimics an
extremal tropical curve depending on the domain on the plane and the positions
of the perturbation points, but not on the mesh of the lattice.
  In this paper, we rigorously formulate these two facts in the form of a
scaling limit theorem and prove it. We rely on the theory of tropical analytic
series, which is used to describe the global features of the sandpile dynamic,
and on the theory of smoothings of discrete superharmonic functions, which
handles local questions.
