柱状图(邻图)3D在Python [英] Barchart (o plot) 3D in Python

查看:647
本文介绍了柱状图(邻图)3D在Python的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要绘制一些数据以各种形式。目前我使用 Matplotlib 和我相当满意我能够产生地块

这个问题是如何绘制最后一个。该数据是类似于距离表,如<一href="http://www.southernct.edu/wellness/uploads/textWidget/wysiwyg/documents/Campus_Walking_Map__Distance_Chart.pdf"相对=nofollow>这个(只是大,我的表是128×128,而且还有每个元素3个或更多一些)。

现在,我的数据是更好的结构化不是一个距离表(我的数据不会改变随意之类的字母顺序排序的距离表),因而3D的柱状图,或它们的可能3,将是完美的。我的理解是这样的图表在Matplotlib丢失。

我可以使用(彩色)Countor3d如在2D这些或类似imshow的,但它是不是真的井重新的数据是什么presentative(数据有意义只是在我的128点,不存在两个点之间的任何东西)。而酒吧的高度比色彩更具可读性,海事组织。

这样的问题:

  1. 是否有可能在Matplotlib创建3D柱状图?应该明确的是,我的意思是一个2D域,不只是一个二维柱状图用一个假3D渲染为了美观的目的
  2. 如果答案为previous问题是否定的,那么有没有一些其他图书馆能做到这一点?我强烈preFER一些基于Python的,但我确定与其他Linux友好的可能性
  3. 如果答案为previous问题是否定的,那么你有没有关于如何显示这些数据有什么建议?例如。创建一个表中的值,叠加到imshow或其他颜色的方法吗?
解决方案

MyavaVi2 可以 3D barcharts (向下滚动了一点)。一旦你有 Mayavi的 /的 VTK / ETS /等。安装这一切精美的作品,但它可以是一些工作得到它所有已安装的。 Ubuntu有它的所有包装,但他们唯一的Linux发行版,我知道那确实。

I need to plot some data in various forms. Currently I'm using Matplotlib and I'm fairly happy with the plots I'm able to produce.

This question is on how to plot the last one. The data is similar to the "distance table", like this (just bigger, my table is 128x128 and still have 3 or more number per element).

Now, my data is much better "structured" than a distance table (my data doesn't varies "randomly" like in a alphabetically sorted distance table), thus a 3D barchart, or maybe 3 of them, would be perfect. My understanding is that such a chart is missing in Matplotlib.

I could use a (colored) Countor3d like these or something in 2D like imshow, but it isn't really well representative of what the data is (the data has meaning just in my 128 points, there isn't anything between two points). And the height of bars is more readable than color, IMO.

Thus the questions:

  1. is it possible to create 3D barchart in Matplotlib? It should be clear that I mean with a 2D domain, not just a 2D barchart with a "fake" 3D rendering for aesthetics purposes
  2. if the answer to the previous question is no, then is there some other library able to do that? I strongly prefer something Python-based, but I'm OK with other Linux-friendly possibilities
  3. if the answer to the previous question is no, then do you have any suggestions on how to show that data? E.g. create a table with the values, superimposed to the imshow or other colored way?

解决方案

MyavaVi2 can make 3D barcharts (scroll down a bit). Once you have MayaVi/VTK/ETS/etc. installed it all works beautifully, but it can be some work getting it all installed. Ubuntu has all of it packaged, but they're the only Linux distribution I know that does.

这篇关于柱状图(邻图)3D在Python的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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