最喜歡的圖表

library(plotly)
## Loading required package: ggplot2
## 
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
## 
##     last_plot
## The following object is masked from 'package:stats':
## 
##     filter
## The following object is masked from 'package:graphics':
## 
##     layout
plot_ly(diamonds, x = ~cut, color = ~clarity) %>%
add_histogram()

這張圖表是由鑽石的資料來生成的,描述在不同的切割質量下(Fair(一般)到Ideal(理想)),鑽石的淨度(從 I1(worst)到IF(best))有什麼樣的變化,可以看得出來整理來說切割質量在這個數據裡面都是算蠻好的,而切割質量越高的通常淨度也不會太差,因為這樣才可以賣出更好的價格。