Hi,

I am experiencing missing "segments" in the output of imshow().  I draw a
slowly growing line in an array, and then display it.  The line is
continuous but in the output, there are segments missing from it.  Of
course, if I zoom into the picture (before saving to output), then I can
see the lines.  However, if I save directly to a file then the segments are
missing.

Here is a minimal example:

"""
import numpy as np
import matplotlib.pyplot as plt

N = 600
slope = 15
x = np.zeros((N,N))
j = np.arange(N)
i = N/2 - j/slope
for idx in zip(i,j):
    x[idx] = 1

plt.imshow(x, interpolation='nearest', cmap=plt.cm.gray_r)
plt.savefig('bug.pdf')
plt.savefig('bug.png')
"""

I have attached an example of the output.  In theory, there should be a
continuous line from the left side of the picture to the right side.  The
problem seems to occur across backends.  Additionally, the thickness of the
segments is not uniform.  Some are thinner than the rest.   Decreasing the
value of N seems to make the issue go away.  Increasing the value of N
makes the problem worse.

Any ideas on what is going on and how I can fix it?

Attachment: bug.pdf
Description: Adobe PDF document

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to