Python script to read summary file and plot density