# PDF prev_xmin = -3 prev_xmax = 3 prev_ymin = 0 prev_ymax = 0.6 post_xmin = -1 post_xmax = 7 post_ymin = 0 post_ymax = 0.8 prev_data_loc = dir + "basic-map-prev-pdf.out" post_data_loc = dir + "basic-map-post-pdf.out" ax = plt.subplot(1, 2, 1) pdfplt.pdfplot_bar(ax, prev_expected, prev_data_loc, prev_xmin, prev_xmax, prev_ymin, prev_ymax) ax.set_title("PDF before map") ax = plt.subplot(1, 2, 2) pdfplt.pdfplot_bar(ax, post_expected, post_data_loc, post_xmin, post_xmax, post_ymin, post_ymax) ax.set_title("PDF after map") # Save Plot # plt.legend() plt.savefig(name + '.pdf') plt.savefig(name + '.png')
# PDF: Represented xmin = -3 xmax = 3 ymin = 0 ymax = 0.6 data_locs = [data_loc(40), data_loc(80), data_loc(340)] i = 1 for _data_loc in data_locs: ax = plt.subplot(1, len(data_locs) + 1, i) # pdfplt.pdfplot_errorbar(ax, expected, _data_loc, xmin, xmax, ymin, ymax) pdfplt.pdfplot_bar(ax, expected, _data_loc, xmin, xmax, ymin, ymax) i = i + 1 # KLD countmin = 40 countmax = 500 rearr_start = 50 rearr_period = 100 kld_max = 0.15 kld_data_loc = dir + "basic-normal-kld.out" ax = plt.subplot(1, len(data_locs) + 1, len(data_locs) + 1) kldplt.kldplot(ax, kld_data_loc, kld_max, countmin, countmax, rearr_start, rearr_period)
# PDF: Represented xmin = -3 xmax = 3 ymin = 0 ymax = 0.6 data_counts = [40, 60, 340] i = 0 for data_count in data_counts: ax = plt.subplot(1, len(data_counts) + 1, i + 1) annotation = "(" + chr(ord('a') + i) + ")" + " pdf at update count: " + str(data_count) ax.set_title(annotation) pdfplt.pdfplot_bar(ax, pdf_expected, pdf_data_loc(data_count), xmin, xmax, ymin, ymax) i = i + 1 # KLD countmin = 40 countmax = 500 rearr_start = 50 rearr_period = 100 kld_max = 0.15 kld_pdf_data_loc = dir + "basic-normal-kld.out" ax = plt.subplot(1, len(data_counts) + 1, len(data_counts) + 1) ax.set_title("(d) KL-divergence")