我在python中有一个整体的对象。这是美国地图的轮廓。 如何将其保存为EPS或PDF?
import matplotlib.pyplot as plt
from shapely.plotting import plot_polygon
print(type(multipolygon))
#<class 'shapely.geometry.multipolygon.MultiPolygon'>
fig, ax = plt.subplots(nrows=1, ncols=1, figsize=(8,5))
plot_polygon(polygon=multipolygon, ax=ax, add_points=False, color="green")
fig.savefig(r"C:\Users\bera\Desktop\gistest\usa.pdf", bbox_inches='tight')
pdf: