<div dir="ltr"><div>I don't see how a binned histogram results are compatible with a boxplot, which directly computes the quartiles and fences from raw data. <br></div><div><br></div><div>I don't understand how we'd begin to infer what those value are.</div><div>-paul<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 2, 2019 at 1:36 PM Elan Ernest <<a href="mailto:elch.rz@ruetz-online.de">elch.rz@ruetz-online.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">For boxplots with predefined statistics consider the `ax.bxp` function,<br>
<br>
<a href="https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.axes.Axes.bxp.html" rel="noreferrer" target="_blank">https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.axes.Axes.bxp.html</a><br>
<br>
For violinplots, one can use `ax.violin`,<br>
<br>
<a href="https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.axes.Axes.violin.html" rel="noreferrer" target="_blank">https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.axes.Axes.violin.html</a><br>
<br>
however, you would need to have calculated the kernel density estimate <br>
yourself, which is in general impossible with already aggregated statistics.<br>
<br>
<br>
Am 02.08.2019 um 13:32 schrieb Neal Becker:<br>
> I'm frequently plotting distributions using e.g., boxplot, violinplot.   But<br>
> I've already binned my data using my own histogram class.  So I already have<br>
> an array of bins, and array of counts for each bin.<br>
><br>
> I don't see any way to directly input this data to plotting routines such as<br>
> boxplot or violinplot.  What I've been doing is using collections.Counter to<br>
> convert this into a single array, for example if the value '10' occurs<br>
> '1000' times, I produce an array with [10]*1000.  Obviously, this doesn't<br>
> scale to 10's of millions of samples.<br>
><br>
> Is there any way to input my data that already has been binned and counted?<br>
><br>
> Thanks,<br>
> Neal<br>
><br>
> (Also, I really wish the same for seaborn)<br>
><br>
> _______________________________________________<br>
> Matplotlib-users mailing list<br>
> <a href="mailto:Matplotlib-users@python.org" target="_blank">Matplotlib-users@python.org</a><br>
> <a href="https://mail.python.org/mailman/listinfo/matplotlib-users" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/matplotlib-users</a><br>
><br>
><br>
_______________________________________________<br>
Matplotlib-users mailing list<br>
<a href="mailto:Matplotlib-users@python.org" target="_blank">Matplotlib-users@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/matplotlib-users" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/matplotlib-users</a><br>
</blockquote></div>