On Wednesday, February 8, 2012, Jerzy Karczmarczuk <
jerzy.karczmarc...@unicaen.fr> wrote:
>
>> I am experiencing missing "segments" in the output of imshow()....
>>
>> Here is a minimal example:
>>
>> 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?
>>
> Imshow scales your geometry according to the figure size, and if you
> *insist* on having the "nearest" interpolation, you may lose pixels
> while drawing, it is as simple as that. No miracles.
>
> How to fix it?
> 1. Use bilinear, or sinc, or any smooth interpolation.
> 2. Make your figure big enough, say  plt.figure(figsize=(14,14)).
>
> Jerzy Karczmarczuk
>
>

Agreed.

Your example above is basically the equivalent of rasterizing a line
(without anti-aliasing) and then down-scaling and possibly causing some
stretching due to changes in aspect ratio.

Because imshow() is unaware the you are actually drawing a line, the
backends can not take advantage of their "bag-o-tricks" to make it look
good.

Perhaps the example you provided was an oversimplified version of the
problem you are having?

Cheers!
Ben Root
------------------------------------------------------------------------------
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