0

I already plot a prediction map I made with xgboost modal by matplotlib function and I want to save this map as a shapefile so I can work with it in ArcGIS, how can I do that?

Picture of the map

the code i use

test_df['probability'] = np.minimum(pred,0.08)

fig,ax = plt.subplots()
fig.set_size_inches((15,15))
test_df.plot(ax=ax,column='probability',cmap=cmap)

plt.gca().set_facecolor('k')
plt.imshow(np.array([[test_df.probability.min(),test_df.probability.max()]]),origin='lower',cmap=cmap)



test_collisions.plot.scatter(x='DDLon',y='DDLat',
                         ax=ax,
                         s=500,
                         color='w',
                         zorder=9e99,
                         marker='*',
                         edgecolors='r')

divider = make_axes_locatable(ax)
cax = divider.append_axes("right", size="5%", pad=0.05)
ax.set_xbound(lower=x0,upper=x1)
ax.set_ybound(lower=y0,upper=y1)
plt.colorbar(cax=cax)
Maram Mubarak
  • 323
  • 2
  • 3
  • 11

0 Answers0