如何创建直方图,其中条形高度涵盖一系列值(最好在 Open Office Calc 中)?

发布于 2024-11-04 18:40:07 字数 249 浏览 4 评论 0原文

我有一个电子表格,其中包含范围从 0.0 到 1.0 的数据,例如,

a, 0.1
b, 0.11
c, 0.7
d, 0.12
...

我想要一个直方图,其中每个条形涵盖一系列值,例如,范围 [0.1, 0.2) 中会有一个高度为 3 的条形图。如何在 Open Office Calc 中执行此操作?如果很难做到,是否有一个常用的工具可以使它变得容易?我更喜欢在 Linux 和 Windows 上都可用的东西。

I have a spreadsheet that contains data that ranges from 0.0 to 1.0, e.g.

a, 0.1
b, 0.11
c, 0.7
d, 0.12
...

I'd like a histogram where each bar covers a range of values, e.g. there would be a bar with a height of 3 for the range [0.1, 0.2). How do I do this in Open Office Calc? If it is hard to do, is there a commonly available tool that makes it easy? I'd prefer something that is available on both Linux and Windows.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

微凉 2024-11-11 18:40:07

到目前为止,我已经找到了两种“解决方案”,它们都可以完成这项工作,但都不是理想的。不过,它们都是免费的,并且适用于 Linux 和 Windows。

Ggobi 提供了一个 GUI,允许您从 CSV 文件读取数据并生成直方图。不幸的是,界面不是那么好,而且很难弄清楚如何操作显示。例如,默认情况下,直方图是“在其一侧”,到目前为止,我还没有弄清楚如何使条形垂直而不是水平。

R 通过一些方便的图形包提供了统计编程环境。例如,您只需几行代码就可以创建一个直方图并将其放入 PDF 文件中:

result <- read.csv("myTable.csv")
str(result)     # look at the structure of the resulting data frame
attach(result)  # make the components of result available as objects
pdf("myTable.pdf")
hist(X.TCC)
plot(X.TCC, MWE, pch="*")
dev.off()

缺点是您需要了解一些有关 R 环境的知识。

So far, I've found two "solutions", both of which can do the job, but neither of which are ideal. However, they are both free and available for both Linux and Windows.

Ggobi provides a GUI that allows you to read in data from a CSV file and produce histograms. Unfortunately, the interface isn't that great, and it is hard to figure out how to manipulate the display. For example, by default, the histogram is "on its side", and thus far, I haven't figured out how to make the bars vertical rather than horizontal.

R provides a programming environment for statistics with some handy graphics packages. For example, you can create a histogram and put it into a PDF file with just a few lines of code:

result <- read.csv("myTable.csv")
str(result)     # look at the structure of the resulting data frame
attach(result)  # make the components of result available as objects
pdf("myTable.pdf")
hist(X.TCC)
plot(X.TCC, MWE, pch="*")
dev.off()

The drawback is that you need to learn something about the R environment.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文