Scaling laws for invariant measures on hyperbolic and nonhyperbolic atractors