[Matplotlib-users] drawing a box
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 be described as a never-ending insult to human intelligence. - João Magueijo - SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] drawing a box
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 - SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] drawing a box
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] 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 -- The game of science can accurately be described as a never-ending insult to human intelligence. - João Magueijo - SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] drawing a box
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 = [0, 0, 1, 1] In [2]: ys = [0, 2, 2, 0] In [3]: fill(xs, ys) Out[3]: [matplotlib.patches.Polygon instance at 0x23d86e8] or create a matplotlib.patches.Rectangle instance, eg http://matplotlib.sf.net/examples/alignment_test.py - SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users