hdp proportion plotting script