python 抠图 锯齿_Python | 绘图中的抗锯齿
生活随笔
收集整理的這篇文章主要介紹了
python 抠图 锯齿_Python | 绘图中的抗锯齿
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
python 摳圖 鋸齒
Antialiasing is another important feature of Matplotlib and in this article, we will review how to use this functionality. pyplot.antialiased() is an inbuilt function in matplotlib.pyplot which performs our required operation.
抗鋸齒是Matplotlib的另一個重要功能,在本文中,我們將介紹如何使用此功能。 pyplot.antialiased()是matplotlib.pyplot中的內置函數,它執行我們所需的操作。
Syntax:
句法:
line, = plt.plot(x, y, '-') line.set_antialiased(False) # turn off antialiasing繪圖中抗鋸齒的Python代碼 (Python code for antialiasing in plotting)
# Data Visualization using Python # Antialiasingimport numpy as np import matplotlib.pyplot as pltx = np.arange(50) y = 60 + np.random.randint(50,70,50)plt.figure() plt.title('Antialiased OFF') line, = plt.plot(x, y) # turn off antialiasing line.set_antialiased(False) plt.figure() plt.title('Antialiased ON') line, = plt.plot(x, y) # turn on antialiasing line.set_antialiased(True)Output:
輸出:
Output is as figure翻譯自: https://www.includehelp.com/python/antialiasing-in-plotting.aspx
python 摳圖 鋸齒
總結
以上是生活随笔為你收集整理的python 抠图 锯齿_Python | 绘图中的抗锯齿的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 摩尔庄园菜谱怎么升级
- 下一篇: 软件故障_一些主要的软件故障