added "type" option to plot