added flexible binning for Plot1D Plot2D