2 回答

TA貢獻(xiàn)1757條經(jīng)驗(yàn) 獲得超7個(gè)贊
可以說(shuō),使用指南的這一部分在當(dāng)前形式下有點(diǎn)難以理解。然而,最近有一個(gè)更新(#14223),這可能會(huì)更清楚。可以在此處找到此預(yù)覽版:
如上所述,基本上有兩種使用 Matplotlib 的方法:
顯式創(chuàng)建圖形和軸,并在它們上調(diào)用方法(“面向?qū)ο?(OO) 樣式”)。
依靠 pyplot 自動(dòng)創(chuàng)建和管理圖形和坐標(biāo)軸,并使用 pyplot 函數(shù)進(jìn)行繪圖。

TA貢獻(xiàn)1812條經(jīng)驗(yàn) 獲得超5個(gè)贊
The next level down in the hierarchy is the first level of the object-oriented
interface, in which pyplot is used only for a few functions such as figure
creation, and the user explicitly creates and keeps track of the figure and axes
objects. At this level, the user uses pyplot to create figures, and through those
figures, one or more axes objects can be created. These axes objects are then used
for most plotting actions.
添加回答
舉報(bào)