added option for 2D plots