xlim affects xticks

Why does set_xlim have to come before set_xticks?
I expect the same ticks but within the limits,
but mpl recomputes the ticks.

Thanks,
Alan Isaac