What is `antialiased` in` matplotlib.collections` and how do you set a parameter for it?

What is antialiased in matplotlib.collections and how do you set a parameter for it?

+6
source share
1 answer

The antialiased keyword antialiased determines whether a particular matplotlib artist (for example, a line, a polygon, etc.) is drawn with anti-healing or not.

As an example, notice the difference in the two graphs below:

 import matplotlib.pyplot as plt plt.subplot(1,2,1) plt.plot(range(10), antialiased=False) plt.title('Antialiasing Off') plt.subplot(1,2,2) plt.plot(range(10), antialiased=True) plt.title('Antialiasing On') plt.show() 

enter image description here

An un-smoothed graph will be faster, so if you are drawing a large amount of data, it may be advisable to turn it off.

+11
source

Source: https://habr.com/ru/post/905247/


All Articles