Penalized Isotonic Regression in one and two dimensions