python script for visualization