Skip to content
Snippets Groups Projects
Commit 5eeb282f authored by Andrew E. Torda's avatar Andrew E. Torda
Browse files

Examples for making histograms.

parent 8643c81b
No related branches found
No related tags found
No related merge requests found
df <- read.csv(file="in1.csv", header=F,
col.names=c("step", "temp","function_value", "x1"))
png(filename="ex1_hist.png")
hist (df$x1, xlab = "x coord", main = "", freq = F, breaks = 60)
dev.off()
File added
# Example histogram for the Uebung.
# If you have the data in a file called in1.csv and the column
# you want is the fourth column, this makes a reasonable histogram.
# Your data is probably in some other column, so change the $4 below.
set datafile separator ','
binwidth=0.005
bin(x,width)=width*floor(x/width)
set title 'distribution of x coords'
set xlab 'x coord'
unset key
plot 'in1.csv' using (bin($4,binwidth)):(1.0) smooth freq with boxes
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment