What is the best way to visualize range of data? If I a have data like a bunch of classes where each class can have a different number of students, and each student has a grade (0-100), for example like this:
tdf = pd.DataFrame({'classes':[&quot;a&quot;, &quot;a&quot;, &quot;a&quot;, &quot;b&quot;, &quot;b&quot;, &quot;b&quot;,&quot;b&quot;,&quot;b&quot;, &quot;c&quot;, &quot;c&quot;],
                    'grades':[78, 28, 10, 3, 79, 91, 65, 51, 75, 89]})

What is the best way to visualize the range of grades within each class? I want to show that in class A, there is a range between 10 and 78, in B there is 3 and 91, in C there is 75 and 89. I was thinking of boxplot or violin plot but when I tried them I am not really sure. Is there such thing as a bar chart that can show range? Will that make sense?
I am not sure if this is the right place to ask, so here I am.
I believe boxplot or violin plot is a good idea and you could overlay datapoints with a bit of jitter to the former. See below an example in seaborn taken from a relevant question:
import seaborn as sns
import matplotlib.pyplot as plt

tips = sns.load_dataset(&quot;tips&quot;)

sns.violinplot(x=&quot;day&quot;, y=&quot;total_bill&quot;, data=tips, color=&quot;0.8&quot;)
sns.stripplot(x=&quot;day&quot;, y=&quot;total_bill&quot;, data=tips, jitter=True, zorder=1)
plt.show()