added scale dependency in legend