SAC R-Visualization#3
SAP Analytics Cloud R-Visualization#3 Jitter Plot Chart # Simulates data and visualizes then as a Jitter Plot # load packages library(ggplot2) # assign dataset.seed(123) myData <-diamonds[sample(nrow(diamonds),9000),] #add styling outputGraphics <- ggplot(myData, aes(x = color, y = price/carat, color = color))+geom_jitter()+ggtitle("Diamond Price by Color")+xlab("Diamond Colour")+ylab("Price per Carat") #output output(Graphics + theme_bw() +theme(legend.position = "none",aspect.ratio =1, panel.grid.major = element_blank(), panel.grid.minor = element_blank(), plot.title = element_text(hjust = 0.5), text = element_text(size = 15))