Some minor refactoring and improvements to our plotting widget.