Skip to content

Instantly share code, notes, and snippets.

@karan19100
Created July 18, 2020 18:46
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/f17655595c6ebbab35d989b1a1bf8d60 to your computer and use it in GitHub Desktop.
Save karan19100/f17655595c6ebbab35d989b1a1bf8d60 to your computer and use it in GitHub Desktop.
histogram_bykaranshah
# Histogram of HEMATOCRIT
qplot(HEMATOCRIT, data = newdata, geom="histogram", binwidth=1,
fill=I("azure4"), col=I("azure3")) +
labs(title = "HEMATOCRIT") +
theme(plot.title = element_text(hjust = 0.5)) +
labs(x ="percent values") +
labs(y = "Frequency") +
scale_y_continuous(breaks = c(0,5,10,15,20,25), minor_breaks = NULL) +
scale_x_continuous(breaks = c(30:65), minor_breaks = NULL) +
geom_vline(xintercept = mean(newdata$HEMATOCRIT), show_guide=TRUE, color
="red", labels="Average") +
geom_vline(xintercept = median(newdata$HEMATOCRIT), 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