Matplotlib中的各个点大小? [英] Individual point-sizing in Matplotlib?

查看:1611
本文介绍了Matplotlib中的各个点大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在matplotlib中设置不均匀的点大小(为每个点设置大小).有没有办法做到这一点?我想我可以通过对每个点使用单独的绘图命令(设置了markersize)来破解它,但这确实很烦人.有没有更原则的方法?

I'd like to have non-uniform point sizes in matplotlib (set a size for each point). Is there a way to do this? I guess I could hack it by having a separate plot command (with markersize set) for each point, but that would be really annoying. Is there a more principled way?

推荐答案

我刚刚发现您可以为此使用scatter:

I just found out that you can use scatter for this:

  scatter(500:600,600:700,1:101);

格式为:scatter(x,y,sizes,markerType)

产生:

这篇关于Matplotlib中的各个点大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆