Inquiry about how to print image by using image output port of Python Script node

Hello.

I was wondering how to print image by using image output port of Python Script node.
Here is my python code in Python Script node.
I just used “plt.show()” than the image opened as “Figure 1” window.
If there is any way to show the image from output port of Python Script node, please tell me.

[Python Script node]
import pandas as pd
import geopandas as gpd
from matplotlib import pyplot as plt
'# Create empty table

countries = gpd.read_file(gpd.datasets.get_path(‘naturalearth_lowres’))
cities = gpd.read_file(gpd.datasets.get_path(‘naturalearth_cities’))

ax = countries.plot(column=“continent”, legend=True, categorical=True)
ax.set_title(“map”)
ax.set_axis_off()
plt.show()

[Figure 1 window]

Thanks,
hhkim

@hhkim you can export the image as PNG file or show it within a data app. You can check this example

There is a video which explains how it can be done

Additional examples can be found on the hub

2 Likes

It was very helpful.
Thank you for your help! :blush:

1 Like