You are on page 1of 1

library(readxl)

data <- read_excel(file.choose())

library(ggplot)

ggplot(data, aes(x = Region, y = Location, fill = Region)) +


geom_bar(stat = "identity", width=0,2) +
scale_fill_grey(start = 0.25, end = 0.75) +
theme_minimal() +
labs(x = "City", y = "Location", title = "Quality Dari City")

ggplot(data, aes(x = Region, y= Location, fill = Region)) +


geom_histogram(stat = "identity") +
theme_minimal() +
labs(x = "City", y = "Frequency", title = "Quality From City", fill = "Type")

ggplot(data, aes(x = Region, y = Location)) +


geom_point() +
geom_segment(aes(x = Region, xend = Region, y = 0, yend = Location), color =
"red") +
labs(x = "Region", y = "Location", title = "Scatter Plot with Segments")

ggplot(data,aes(x=City,y=Quantity, fill=City)) +
geom_bar(stat="identity", alpha=.6, width=.4) +
labs(x = "Kota", y = "Quantity", fill = "Penjelasan")

You might also like