source code for visualizing clusters