matplotlib离散箱图
使用离散的bin图,我指的是一种类型的图,该图不会与直线连接点,而是使用最接近每个点的所有区域使用恒定值。
这是使用PDL和PGPLOT的此类图的一个示例。
pdl> use PDL::Graphics::PGPLOT;dev('/xs');$x=rint(grandom(20)*10);print $x;bin($x);hold;points($x,{color=>'red'})
[-19 -3 4 7 -8 -2 9 15 4 7 1 -14 -4 -4 11 6 -15 -13 2 1]Graphics on HOLD
这种类型的图有时很有用。
我有兴趣了解一种在matplotlib中显示这种类型情节的方法。我找不到特定功能。
在Matplotlib中进行此操作的替代方法也将很有用,也许是其他用于绘制Python的软件包。非常感谢!
With discrete bin plot I refer to a type of plot which does not connect the points with a straight line, but uses a constant value for all the region which is closest to each point.
This is an example of this type of plot using PDL and PGPLOT.
pdl> use PDL::Graphics::PGPLOT;dev('/xs');$x=rint(grandom(20)*10);print $x;bin($x);hold;points($x,{color=>'red'})
[-19 -3 4 7 -8 -2 9 15 4 7 1 -14 -4 -4 11 6 -15 -13 2 1]Graphics on HOLD
This type of plot is sometimes useful.
I am interested in knowing a way to display this type of plot in matplotlib. I could not find a specific function.
Alternative ways to do it in matplotlib would also be useful as well as perhaps other packages for plotting in python. Thank you very much!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这就是称为a step plot matplotlib in matplotlib:
This is called a step plot in matplotlib: