亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

matplotlib的兩種風格是什么?

matplotlib的兩種風格是什么?

qq_遁去的一_1 2022-06-14 09:52:44
我正在閱讀 matplotlib 的文檔。在“編碼風格”部分下,它說:查看本文檔和示例時,您會發現不同的編碼風格和使用模式。之后...在不同的風格中,有兩種是官方支持的。因此,這些是使用 matplotlib 的首選方式。對于 pyplot 風格...但是在該部分的其余部分中,他們從未明確解釋或提及“第二種”支持的編碼風格。他們談到了“MATLAB 風格”,但從上下文中不清楚這是指該pyplot風格(就像 MATLAB 一樣),或者它本身是否是一種單獨的風格。問題第二種支持的 matplotlib 編碼風格是什么,它與該風格有何關聯/不同pyplot?
查看完整描述

2 回答

?
長風秋雁

TA貢獻1757條經驗 獲得超7個贊

可以說,使用指南的這一部分在當前形式下有點難以理解。然而,最近有一個更新(#14223),這可能會更清楚。可以在此處找到此預覽版:

https://matplotlib.org/devdocs/tutorials/introductory/usage.html#the-object-oriented-interface-and-the-pyplot-interface

如上所述,基本上有兩種使用 Matplotlib 的方法:

  • 顯式創建圖形和軸,并在它們上調用方法(“面向對象 (OO) 樣式”)。

  • 依靠 pyplot 自動創建和管理圖形和坐標軸,并使用 pyplot 函數進行繪圖。


查看完整回答
反對 回復 2022-06-14
?
慕雪6442864

TA貢獻1812條經驗 獲得超5個贊

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.


查看完整回答
反對 回復 2022-06-14
  • 2 回答
  • 0 關注
  • 119 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號