On Thu, Mar 14, 2013 at 12:40 AM, <paul.czodrow...@merckgroup.com> wrote:

> Dear Matplotlibbers,
>
> I'm running matplotlib 1.1.0 and would like to plot pairs of values,
> e.g.
> [[0.27,0.43],[0.17,0.35]]
>
> When using boxplot, the values of the pairs correspond to the "outer
> whiskers", but I would like that the interquartile ranges correspond to the
> value pairs. The whiskers shall NOT be shown.
>
> The rationale behind the value pairs: these pairs correspond to confidence
> intervals, and I would like to compare confidence intervals from different
> measurements and thought that matplotlib could help me.
>
>
>
> Cheers & Thanks,
> Paul
>
>
You lost me. Are you trying to create box and whisker plots or do you just
want rectangles? N = 2 is awfully small dataset for box/whisker plots. If
all you want are the rectangles -- use those directly:

import numpy as np
import matplotlib.pyplot as plt
from matplotlib.patches import Rectangle

data = np.array([[0.27,0.43],[0.17,0.35]])
fig, ax = plt.subplots()
box_width = 0.5
for pos, row in enumerate(data):
    xy = (pos+1, np.min(row))
    box_height = np.max(row) - np.min(row)
    box = Rectangle(xy, box_width, box_height, facecolor='white',
edgecolor='black', linewidth=1.5)
    ax.add_patch(box)

ax.set_xlim([0, pos+2])
ax.set_ylim([0, data.max()*1.25])
plt.show()
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to