  In this paper, we give precise mathematical form to the idea of a structure
whose data and axioms are faithfully represented by a graphical calculus; some
prominent examples are operads, polycategories, properads, and PROPs. Building
on the established presentation of such structures as algebras for monads on
presheaf categories, we describe a characteristic property of the associated
monads---the shapeliness of the title---which says that "any two operations of
the same shape agree". An important part of this work is the study of analytic
functors between presheaf categories, which are a common generalisation of
Joyal's analytic endofunctors on sets and of the parametric right adjoint
functors on presheaf categories introduced by Diers and studied by
Carboni--Johnstone, Leinster and Weber. Our shapely monads will be found among
the analytic endofunctors, and may be characterised as the submonads of a
universal analytic monad with "exactly one operation of each shape". In fact,
shapeliness also gives a way to define the data and axioms of a structure
directly from its graphical calculus, by generating a free shapely monad on the
basic operations of the calculus. In this paper we do this for some of the
examples listed above; in future work, we intend to do so for graphical calculi
such as Milner's bigraphs, Lafont's interaction nets, or Girard's
multiplicative proof nets, thereby obtaining canonical notions of denotational
model.
