Google 图表中的玫瑰图
我在 Google Chart 中搜索了制作玫瑰图(圆形直方图)的方法。 API 只有雷达图,因此技术上似乎不可能(我是对的吗?)。这个风玫瑰示例是我最接近的解决方案。
因为我需要它们,所以我找到了一种使用雷达图、Python 和 Google-Chartwrapper 库。有一个(非技术性的)写-可用,代码位于 Github 上。
在我进一步讨论之前(即干净的代码、抽象、浪费更多时间等),有没有其他人看过可能有用的 Google 图表中的玫瑰图示例?
(顺便说一句,我知道关于 matplotlib 等。我出于需要而使用 Python 3.x,但到目前为止,图形库还没有赶上我需要的程度,另请参阅问题 418835))。
I searched around for ways to make rose diagrams (circular histograms) in Google Chart. The API has only radar diagrams, so it seems not technically possible (am I correct?). This wind rose example was the closest I came to a solution.
Because I needed them, I figured out a way to fake them quickly using the Radar plots, Python and the Google-Chartwrapper library. There's a (non-technical) write-up available and the code is on Github.
Before I take this further (i.e. clean code, abstract, waste more time, etc.), has anyone else seen examples of Rose diagrams in Google Chart that might be useful?
(By the way, I know about matplotlib, etc. I'm using Python 3.x out of necessity and, as yet, the graphing libraries haven't caught up enough to use as I need them. See also SO question 418835))
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
嗯,看起来没有人有任何其他例子。我确实决定尝试一下,看看还有什么可能,并为 基于时间的玫瑰创建了一个快速概念证明图表。按一天中的时间显示相对的 Twitter 发帖量是一件愚蠢的事情,但它展示了如何将 Google Chart 用于玫瑰图。这里的问题,以及 Google Chart 所说明的一般问题,是您无法在图表中嵌入数据,具有向下钻取功能、弹出窗口等(就像您可以使用 Javascript/Flex/其他解决方案)。
如果有一个基于 javascript 的 Google Chart 风格的 API,允许嵌入数据,那就太好了。
Well, it looks like no-one has any other examples. I DID decide to play around with this to see what else is possible and created a quick proof of concept for time-based rose diagrams. It's just a silly thing to show your relative Twitter posting amount by time of day, but shows how Google Chart can be used for rose diagrams. The problem here, and a problem in general that this has illustrated with Google Chart, is that you cannot have embedded data contained in the chart, with drill-down capabilities, popups, etc. (as you could with a Javascript/Flex/other solution).
It'd be nice if there were a Google Chart-style API that was javascript based to allow embedded data.