Fixed a bug in the matplotlib lab. Also changed some code formatting.