#将散点图分为1010个网格, frommatplotlibimportpyplotaspltimportmatplotlibasmplimportpandasaspdimportnumpyasnpmpl.rcparams [ ' font.ssont.spdimportimp mpl.rcparams [ ' axes.unicode _ MINUS ' ]=false data=PD.read _ CSV (c :/users/administrator 2列中的PLT.scater label=)数据点) )出图点) x, y )的散点图PLT.xlabel(x ) (PLT.ylabel (y ) ) plt.legend ) (#plt.grid ) ) n=11 #n表示将区域划分为10*10个子区域n ) PLT.HLINES(HLINES,min(VLINES ),max ) VLINES ),colors='.25 ',max(hlines ),colors='.25 ',line widine hlines[:-1] y ) inenumerate(zip(xs.Flatten (,ys.flatten ) ) : plt.text(x ) x、y、str(I1 )