For any self-similar measure µ in R, we show that the distribution of µ is controlled by products of non-negative matrices governed by a finite or countable graph depending only on the IFS. This generalizes the net interval construction of Feng from the equicontractive finite type case. When the measure satisfies the weak separation condition, we prove that this directed graph has a unique attractor. This allows us to verify the multifractal formalism for restrictions of µ to certain compact subsets of R, determined by the directed graph. When the measure satisfies the generalized finite type condition with respect to an open interval, the directed graph is finite and we prove that if the multifractal formalism fails for any q ∈ R, there must be a cycle with no vertices in the attractor. As a direct application, we verify the complete multifractal formalism for an uncountable family of IFSs with overlaps and without logarithmically commensurable contraction ratios.