Skip to content

Instantly share code, notes, and snippets.

@karan19100
Created July 18, 2020 18:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save karan19100/81b74c8d8e71faae5517bc279a51ad46 to your computer and use it in GitHub Desktop.
Save karan19100/81b74c8d8e71faae5517bc279a51ad46 to your computer and use it in GitHub Desktop.
Histogram_by_karanshah
# Histogram of HEMAGLOBIN
qplot(HEMAGLOBIN, data = newdata, geom="histogram", binwidth=0.5,
fill=I("azure4"), col=I("azure3")) +
labs(title = "HEMAGLOBIN") +
theme(plot.title = element_text(hjust = 0.5)) +
labs(x ="Concentration (in g per decaliter)") +
labs(y = "Frequency") +
scale_y_continuous(breaks = c(0,5,10,15,20,25,30,35,40,45,50), minor_breaks = NULL) +
scale_x_continuous(breaks = c(10:25), minor_breaks = NULL) +
geom_vline(xintercept = mean(newdata$HEMAGLOBIN), show_guide=TRUE, color
="red", labels="Average") +
geom_vline(xintercept = median(newdata$HEMAGLOBIN), show_guide=TRUE, color
="blue", labels="Median")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment