fix to matplotlib-based script for visualization in high dimensions