Fix auto scale domain on stacked plot.

Retarget fo #1360