Plt.show() in Anaconda code

Hi !
I cannot visualize a graph in Excel with Anaconda code

Here is my trial code:

trial= pd.DataFrame({‘ym’: [‘2024-01’, ‘2024-02’, ‘2024-03’], ‘close’: [150, 160, 155] })

trial.plot(kind=‘line’, x=‘ym’, y=‘close’)
plt.xlabel(‘ym’)
plt.ylabel(‘Close’)
plt.xticks(rotation=45)

plt.show()

and I get this : <PIL.PngImagePlugin.PngImageFile image mode=RGBA size=640x480 at 0x3574BB0>

Thanks a lot for your help,
Marc

Marc,
The graph is being created. The <PIL.PngImagePlugin.PngImageFile image mode=RGBA size=640x480 at 0x3574BB0> is simply the text representation of the image. The actual image is sitting in the Excel cell where you created the code.

Unfortunately, it’s a very light graph with a white background, so it’s probably very hard to see that it’s actually there. If you click on the cell, an icon will appear above it which allows you to create a larger floating reference to the image.

Thanks a lot for your help !