How do I create a histogram where the bar heights cover a range of values (preferably in Open Office Calc )?
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.
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.
精彩评论