We present a method for fabricating anchored polymers with a gradual variation of grafting densities on solid substrates. The technique for generating such structures comprises (i) formation of a molecular gradient of polymerization initiator on the solid substrate and (ii) polymerization from the substrate-bound initiator centers ("grafting from"). We measure the mushroom-to-brush transition in grafted polyacrylamides and show that the mushroom and brush behavior can be described using existing scaling theories.