{"id":8538,"date":"2024-04-27T18:01:01","date_gmt":"2024-04-27T10:01:01","guid":{"rendered":""},"modified":"2024-04-27T18:01:01","modified_gmt":"2024-04-27T10:01:01","slug":"Python\u7ed8\u5236\u4e09\u7ef4\u6563\u70b9\u56fe\u5e76\u7ed9\u6563\u70b9\u6807\u8bb0\u8bb0\u53f7","status":"publish","type":"post","link":"https:\/\/mushiming.com\/8538.html","title":{"rendered":"Python\u7ed8\u5236\u4e09\u7ef4\u6563\u70b9\u56fe\u5e76\u7ed9\u6563\u70b9\u6807\u8bb0\u8bb0\u53f7"},"content":{"rendered":"
\u5c06\u4e09\u7ef4\u6563\u70b9\u7ed8\u5236\u5728\u4e09\u7ef4\u7a7a\u95f4\u4e2d\uff0c\u5e76\u7ed9\u76f8\u5e94\u7684\u70b9 \u6807\u8bb0\u5e8f\u53f7\uff1a<\/p>\n
\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D<\/p>\n
x=[1,2,3,4,5]
y=[2,1,4,3,5]
z=[6,5,4,3,1]<\/p>\n
ax = plt.figure().add_subplot(111,projection='3d')
ax.scatter(x, y, z,c='r',marker='o')
for i in range(len(x)):
ax.text(x[i],y[i],z[i],i) <\/p>\n
<\/p>\n
\u5f53\u7136\u4e5f\u53ef\u4ee5\u6807\u8bb0\u5176\u4ed6\u7684\u540d\u79f0\u4e86\uff1a<\/p>\n
\u5c06\u6700\u540e\u4e24\u884c\u7684\u4ee3\u7801\u7a0d\u52a0\u4fee\u6539\u5c31\u53ef\u4ee5\u5566\uff1a<\/p>\n
name=['\u5317\u4eac','\u4e0a\u6d77','\u5e7f\u5dde','\u6df1\u5733','\u676d\u5dde']
for i in range(len(x)):
ax.text(x[i],y[i],z[i],name[i]) <\/p>\n
\u753b\u51fa\u6765\u7684\u56fe\u5c31\u662f\u8fd9\u6837\u7684\u4e86\uff1a<\/p>\n
<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u7ed8\u5236\u4e09\u7ef4\u6563\u70b9\u56fe\u5e76\u7ed9\u6563\u70b9\u6807\u8bb0\u8bb0\u53f7\u5c06\u4e09\u7ef4\u6563\u70b9\u7ed8\u5236\u5728\u4e09\u7ef4\u7a7a\u95f4\u4e2d\uff0c\u5e76\u7ed9\u76f8\u5e94\u7684\u70b9\u6807\u8bb0\u5e8f\u53f7\uff1a\u4ee3\u7801\u5982\u4e0b\uff1aimportmatplotlib.pypl...","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"_links":{"self":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/8538"}],"collection":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/comments?post=8538"}],"version-history":[{"count":0,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/8538\/revisions"}],"wp:attachment":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/media?parent=8538"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/categories?post=8538"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/tags?post=8538"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}