Found a workaround, which is to specify the format...
# beginners-need-help
b
Found a workaround, which is to specify the format in the dictionary key, but this doesn't feel right, as it's not what the documentation suggests:
Copy code
python
plots_dict = dict()
for colour in ["blue", "green", "red"]:
    plots_dict[f"{colour}.pdf"] = plt.figure()
    plt.plot([1, 2, 3], [4, 5, 6], color=colour)
plt.close("all")
dict_plot_writer = MatplotlibWriter(
    filepath="matplotlib_dict",
    save_args={
        # "format": "pdf",
        "dpi": 300,
        "bbox_inches": "tight",
    },
)
dict_plot_writer.save(plots_dict)