共用方式為


Matplotlib

Databricks Runtime 會顯示 Matplotlib 圖表內嵌。

Notebook 範例:Matplotlib

下列 Notebook 示範如何在 Python Notebook 中顯示 Matplotlib 圖文框。

Matplotlib Python Notebook

取得筆記本

以較高解析度轉譯影像

您可以在 Python Notebook 中以雙倍的標準解析度轉譯 matplotlib 影像,以更佳的視覺效果體驗為使用者提供高解析度畫面。 在 Notebook 資料格中設定下列其中一項:

retina 選項:

%config InlineBackend.figure_format = 'retina'

from IPython.display import set_matplotlib_formats
set_matplotlib_formats('retina')

png2x 選項:

%config InlineBackend.figure_format = 'png2x'

from IPython.display import set_matplotlib_formats
set_matplotlib_formats('png2x')

若要切換回標準解析度,請將下列內容新增至 Notebook 資料格:

set_matplotlib_formats('png')

%config InlineBackend.figure_format = 'png'