> 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()


Dear Paul,

sorry for misleading you!

Indeed, I'm more interested in a rectangle, exactly as you showed it!


Your code and quick response is highly appreciated!


Cheers,
Paul

This message and any attachment are confidential and may be privileged or
otherwise protected from disclosure. If you are not the intended recipient,
you must not copy this message or attachment or disclose the contents to
any other person. If you have received this transmission in error, please
notify the sender immediately and delete the message and any attachment
from your system. Merck KGaA, Darmstadt, Germany and any of its
subsidiaries do not accept liability for any omissions or errors in this
message which may arise as a result of E-Mail-transmission or for damages
resulting from any unauthorized changes of the content of this message and
any attachment thereto. Merck KGaA, Darmstadt, Germany and any of its
subsidiaries do not guarantee that this message is free of viruses and does
not accept liability for any damages caused by any virus transmitted
therewith.

Click http://www.merckgroup.com/disclaimer to access the German, French,
Spanish and Portuguese versions of this disclaimer.


------------------------------------------------------------------------------
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