python - Matplotlib confused sub-pixel resolution -


I want to plot a narrow peak that contains several thousand data points, except that I have to raise the peak points Want to I'm using Python 2.7 and Winplotlib 1.3.1 on Win7 (checked on two separate PCs). For example, here a Gaussian mark is identified as red on SQLT (2):

  plt.plot (-Range (-4,4,1e-5) + sqrt (2), exp (-Range (-4,4,1-5) ** 2) * 0.92, 'a', [sqrt (2), sqrt (2)], [0,1], 'r' )  

matplotlib zoom issue

when conspiracy If you are very wide then you will not know that anything is wrong, but as you compress the plot, you will start to see that the red line sits on the right side of the peak, taking a screenshot and using it. By zooming in on the pixel, you can see that the line is a pixel where it should be. (The image above shows that without the red line and in the form of a rising peak to make it clear that the line has remembered the peak.)

Am I stupid or is it a Is there a bug? If this is a bug then possibly one of the two rows is wrong: black or red?

Concerning a single pixel can be pedantic, but your eye is actually surprisingly good at sub-pixel interpolation and can easily spot the problem.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -