Following the <docs example> I copy paste the code...
# questions
s
Following the docs example I copy paste the code into the notebook started with
kedro jupyter lab
, the image is generated but the image is corrupt / can not be displayed.
Copy code
import matplotlib.pyplot as plt
from kedro.extras.datasets.matplotlib import MatplotlibWriter

fig = plt.figure()
plt.plot([1, 2, 3])
plot_writer = MatplotlibWriter(
    filepath="data/08_reporting/output_plot.png"
)
plt.close()
plot_writer.save(fig)
The PDF example works though. Could it be that the docs are not updated? How would one save a plot with pure matplotlib plots (without seaborn) ?
j
hey @Sergey S, can you detail a bit what "the miage is corrupt" means? if you're on a Linux or macOS environment, can you do
Copy code
$ file output_plot.png
after generating it? as well as
du -h output_plot.png