added plotting to probanalysis.R