Fix 3D plotting.

I think it is working ok now for 2 and 3 D variables.
To figure out what the axes are, check the data in the
controlling terminal that shows the variables, dimensions
and sizes of various dimensions.