library(ggplot2)
## Warning: package 'ggplot2' was built under R version 3.4.2
cancer <- read.csv("Rdatasets-master/csv/survival/cancer.csv")
head(cancer)
## X inst time status age sex ph.ecog ph.karno pat.karno meal.cal wt.loss
## 1 1 3 306 2 74 1 1 90 100 1175 NA
## 2 2 3 455 2 68 1 0 90 90 1225 15
## 3 3 3 1010 1 56 1 0 90 90 NA 15
## 4 4 5 210 2 57 1 1 90 60 1150 11
## 5 5 1 883 2 60 1 0 100 90 NA 0
## 6 6 12 1022 1 74 1 1 50 80 513 0
# Change the width of bars
ggplot(data=cancer, aes(x=status)) +
geom_bar(stat="count", width=0.5)

# Change colors
ggplot(data=cancer, aes(x=status)) +
geom_bar(stat="count", color="blue", fill="chartreuse")

# Minimal theme + blue fill color
p<-ggplot(data=cancer, aes(x=status)) +
geom_bar(stat="count", fill="steelblue")+
theme_minimal()