python code to make figures look nice