Problem in setting the range of the plot