matplotlib fill command on axes plot problem

R

Rominsky

I am trying to use the fill command to draw a box around an object in
an image. I can get the box drawn, but there seems to be a side
effect. The fill command is adding white lines to the top and
sometimes right side of my axes plots. I am using small images,
124x200, and after the fill command the axes plot is changed to
140x200, with the top 16 lines being all white. I am running it in
interactive mode from the python command line. Here is code that
reproduces the problem.

from pylab import *
im_array = zeros((124,200))
ion()
figure()
imshow(im_array)
hold(True)
x=40
y=40
fill([x-5,x+5,x+5,x-5],[y+5,y+5,y-5,y-5],ec='r', fill = False)
hold(False)

Any thoughts on what I might be doing wrong?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top