[Matplotlib-users] drawing a box

2007-12-18 Thread Bryan Fodness
I would like to draw a polygon using a x1, x2, y1, and y2. I tried to use axhline and axvline with the min and max values but it does give the desired result. It changes the axis limits and does not draw a line at all. Any help would be appreciated. Bryan -- The game of science can accurately

Re: [Matplotlib-users] drawing a box

2007-12-18 Thread John Hunter
On Dec 18, 2007 9:00 PM, Bryan Fodness [EMAIL PROTECTED] wrote: I would like to draw a polygon using a x1, x2, y1, and y2. At a minimum, x1, x2, y1, and y2 define a line segment, or at most a rectangle. You say a polygon. What exactly do you mean, and what have you tried (code please)? JDH

Re: [Matplotlib-users] drawing a box

2007-12-18 Thread Bryan Fodness
I do want a rectangle. And, I have tried, axvline(x=x1, ymin=y1, ymax=y2) axvline(x=x2, ymin=y1, ymax=y2) axhline(y=y1, xmin=x1, xmax=x2) axhline(y=y2, xmin=x1, xmax=x2) On Dec 18, 2007 10:40 PM, John Hunter [EMAIL PROTECTED] wrote: On Dec 18, 2007 9:00 PM, Bryan Fodness [EMAIL PROTECTED]

Re: [Matplotlib-users] drawing a box

2007-12-18 Thread John Hunter
On Dec 18, 2007 9:47 PM, Bryan Fodness [EMAIL PROTECTED] wrote: I do want a rectangle. And, I have tried, axvline(x=x1, ymin=y1, ymax=y2) axvline(x=x2, ymin=y1, ymax=y2) axhline(y=y1, xmin=x1, xmax=x2) axhline(y=y2, xmin=x1, xmax=x2) You can either use the plot function fill In [1]: xs