感谢您阅读我的问题!Python绘图修复大小
我创建使用Pyplot情节,这是我的数据: “点” 阵列的
长度:114745
“id_item” 数组的长度为:114745
“会话”数组的长度为:92128
这是我的代码:
point = []
id_item = []
sessions = [] # temp_dict.keys()
for item in cursor_fromCompanyDB:
sessions.append(item['sessionId'])
for object_item in item['objects']:
point.append(object_item['point'])
id_item.append(object_item['id'])
plt.figure()
plt.title('Scatter Point and Id of SessionId', fontsize=20)
plt.xlabel('point', fontsize=15)
plt.ylabel('Item', fontsize=15)
plt.scatter(point, id_item, marker = 'o')
plt.autoscale(enable=True, axis=u'both', tight=False)
for label, x, y in zip(sessions, point, id_item):
plt.annotate(label, xy = (x, y))
plt.show()
这是结果:
正如你所看到的,值非常接近,很难看到。
我想在值id_item显示在中心(会话)容易看到的全部价值和价值。
非常感谢您的帮助。
你有92,000分,我怀疑它很容易就能看到完整的价值而不会产生巨大的数字, – GWW
@GWW,'为什么我问谁有更好的解决方案! –