Added adjustment of axis ranges, contour plots, gridlines, timestamp.
Replaced some if..then..else statements with switch statements.