本文簡要介紹 python 語言中mpl_toolkits.axes_grid1.anchored_artists.AnchoredDrawingArea
的用法。
-
具有固定大小且可填充的錨定容器
DrawingArea
。添加到
drawing_area
的藝術家將其坐標解釋為像素。對藝術家設置的任何轉換都將被覆蓋。- 參數:
- width, height 浮點數
-
容器的寬度和高度(以像素為單位)。
- xdescent, ydescent 浮點數
-
容器在 x 和 y 方向上的下降(以像素為單位)。
- loc str
-
這位藝術家的位置。有效位置為'upper left'、'upper center'、'upper right'、'center left'、'center'、'center right'、'lower left'、'lower center'、'lower right'。為了向後兼容,也接受數值。詳情請參見
Legend
的參數loc
。 - pad 浮點數,默認值:0.4
-
子對象周圍的填充,以字體大小的一小部分。
- borderpad 浮點數,默認值:0.5
-
邊框填充,以字體大小的分數表示。
- prop
FontProperties
,可選 -
用作填充參考的字體屬性。
- frameon 布爾值,默認值:真
-
如果為真,請在這位藝術家周圍畫一個方框。
- **kwargs
-
關鍵字參數轉發到
AnchoredOffsetbox
。
例子
要在軸
ax
的右上角顯示不同大小的藍色和紅色圓圈:>>> ada = AnchoredDrawingArea(20, 20, 0, 0, ... loc='upper right', frameon=False) >>> ada.drawing_area.add_artist(Circle((10, 10), 10, fc="b")) >>> ada.drawing_area.add_artist(Circle((30, 10), 5, fc="r")) >>> ax.add_artist(ada)
- 屬性:
- drawing_area
DrawingArea
-
藝術家展示的容器。
- drawing_area
用法
class mpl_toolkits.axes_grid1.anchored_artists.AnchoredDrawingArea(width, height, xdescent, ydescent, loc, pad=0.4, borderpad=0.5, prop=None, frameon=True, **kwargs)
相關用法
- Python matplotlib AnchoredDirectionArrows用法及代碼示例
- Python matplotlib AnchoredAuxTransformBox用法及代碼示例
- Python matplotlib AnchoredSizeBar用法及代碼示例
- Python matplotlib Axes.get_legend_handles_labels用法及代碼示例
- Python matplotlib AbstractMovieWriter用法及代碼示例
- Python matplotlib Axes.hist用法及代碼示例
- Python matplotlib Axes.step用法及代碼示例
- Python matplotlib Axes.contour用法及代碼示例
- Python matplotlib Axes.plot用法及代碼示例
- Python matplotlib Axes.semilogx用法及代碼示例
- Python matplotlib Axes.semilogy用法及代碼示例
- Python matplotlib Axes.inset_axes用法及代碼示例
- Python matplotlib Axes.axis用法及代碼示例
- Python matplotlib AutoDateFormatter用法及代碼示例
- Python matplotlib Axes.barbs用法及代碼示例
- Python matplotlib Axes.tripcolor用法及代碼示例
- Python matplotlib AsteriskPolygonCollection用法及代碼示例
- Python matplotlib Affine2D.set_matrix用法及代碼示例
- Python matplotlib AxisArtist.toggle用法及代碼示例
- Python matplotlib Axis.get_tick_params用法及代碼示例
- Python matplotlib Axes.set_prop_cycle用法及代碼示例
- Python matplotlib ArrowStyle用法及代碼示例
- Python matplotlib Axes.axline用法及代碼示例
- Python matplotlib Axes.tick_params用法及代碼示例
- Python matplotlib Axes.axvspan用法及代碼示例
注:本文由純淨天空篩選整理自skytowner.com大神的英文原創作品 mpl_toolkits.axes_grid1.anchored_artists.AnchoredDrawingArea。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。