From 44a04d63b83ee09b7b8a1f52534609092068de6a Mon Sep 17 00:00:00 2001 From: Pritimay Sarkar Date: Tue, 13 Feb 2024 20:08:41 +0530 Subject: [PATCH] box plot --- scripts/cr_box_plot.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 scripts/cr_box_plot.py diff --git a/scripts/cr_box_plot.py b/scripts/cr_box_plot.py new file mode 100644 index 0000000..4dcee8d --- /dev/null +++ b/scripts/cr_box_plot.py @@ -0,0 +1,19 @@ +import pandas as pd +import matplotlib.pyplot as plt + +data = { + '_id': [4369, 819, 3952, 395, 3954], + 'classificationResult': ['Sickle Cell Trait', 'Normal', 'Sickle Cell Disease', 'Sickle Cell Disease', 'Sickle Cell Disease'], + 'deviceRatio': [0.3137193, 0.4029867, 0.5270785, 0.479178, 0.4949574] +} + +df = pd.DataFrame(data) + +box_plot = df.boxplot(column='deviceRatio', by='classificationResult', vert=True) + +plt.title('Box Plot of Device Ratio by Classification Result') +plt.xlabel('Classification Result') +plt.ylabel('Device Ratio') + +plt.show() +