Matplotlib

The method for displaying Matplotlib figures depends on which version of Databricks Runtime your cluster is running:

  • Databricks Runtime 6.5 and above: directly support displaying figures inline.
  • Databricks Runtime 6.4: Call the %matplotlib inline magic command.
  • Databricks Runtime 6.3: Configure your cluster with spark.databricks.workspace.matplotlibInline.enabled = true and call the %matplotlib inline magic command.
  • Databricks Runtime 6.2 and below: Use the display function.

The following notebook shows how to display Matplotlib figures in Python notebooks.

Matplotlib Python notebook

Open notebook in new tab