My question is: Is it possible to write any scheme as a (1-categorical) colimit of a diagram of affines? If no, what are some examples?


I ask this question because I have read that one can write any derived scheme as a colimit (in the $\infty$-categorical sense) over a diagram of affine derived schemes. So I am curious what is the analogous statement is in the classical setting. 



Is it always possible to write a scheme as a colimit of affine schemes?
Yes, this is just a basic fact in category theory, if interpreted correctly. For $C$ any category, and $F$ any preheaf on $C,$ $F$ is the colimit in presheaves of the diagram $C/F \to C \stackrel{y}{\hookrightarrow} Psh(C),$ which sends a morphism $f:y(C) \to F,$ to $y(C),$ where $y$ is the Yoneda embedding. This follows immediately from the Yoneda lemma. Now, if $F$ is a sheaf for some Grothendiek topology, then since the sheafification functor $a$ is a left adjoint, it preserves all colimits, so we also have that $F$ is the colimit of the diagram $C/F \to C \stackrel{y}{\hookrightarrow} Sh(C).$ Note that this diagram consists entirely of representables (provided the Grothendieck topology is subcanonical, i.e. each representable is a sheaf). Now, take $C$ to the the category of affine schemes, and let the Grothendieck topology be the Zariski topology. The functor of points of any scheme, in particular, is a sheaf. The result now follows.


