當前位置: 首頁>>編程示例 >>用法及示例精選 >>正文


Python matplotlib silent_list用法及代碼示例

本文簡要介紹 python 語言中 matplotlib.cbook.silent_list 的用法。

用法

class matplotlib.cbook.silent_list(type, seq=None)

基礎: list

帶有簡短 repr() 的列表。

這意味著用於藝術家的同質列表,這樣他們就不會導致冗長的、無意義的輸出。

代替

[<matplotlib.lines.Line2D object at 0x7f5749fed3c8>,
 <matplotlib.lines.Line2D object at 0x7f5749fed4e0>,
 <matplotlib.lines.Line2D object at 0x7f5758016550>]

一個會得到

<a list of 3 Line2D objects>

如果self.type 為 None,則類型名稱從列表中的第一項(如果有)中獲取。

相關用法


注:本文由純淨天空篩選整理自skytowner.com大神的英文原創作品 matplotlib.cbook.silent_list。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。