We present formulae for computing the Yamada polynomial of spatial graphs obtained by replacing edges of plane graphs, such as cycle-graphs, theta-graphs, and bouquet-graphs, by spatial parts. As a corollary, it is shown that zeros of Yamada polynomials of some series of spatial graphs are dense in a certain region in the complex plane, described by a system of inequalities. Also, the relation between Yamada polynomial of graphs and the chain polynomial of edge-labeled graphs is obtained.