use ranges for plotting