Skip to content

Instantly share code, notes, and snippets.

@stephengruppetta
Created November 22, 2023 23:15
Show Gist options
  • Save stephengruppetta/3b62e085ba6477200288ee6619cd6b28 to your computer and use it in GitHub Desktop.
Save stephengruppetta/3b62e085ba6477200288ee6619cd6b28 to your computer and use it in GitHub Desktop.
import matplotlib.pyplot as plt
image = plt.imread("gardens.jpg")
# Create a figure
fig, axs = plt.subplot_mosaic(
[
["colour", "colour", "colour"],
["colour", "colour", "colour"],
["colour", "colour", "colour"],
["red", "green", "blue"],
]
)
print(axs)
# {
# 'colour': <Axes: label='colour'>,
# 'red': <Axes: label='red'>,
# 'green': <Axes: label='green'>,
# 'blue': <Axes: label='blue'>,
# }
print(type(axs))
# <class 'dict'>
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment