x <- c(35, 15, 20, 25)
names(x) <- c('蘭鋳', '出目金', '流金', '土佐金')
x
## 蘭鋳 出目金 流金 土佐金
## 35 15 20 25
# カラーパレット
COL <- c(rgb(255, 0, 255, 55, max = 255), # ピンク
rgb( 0, 0, 255, 55, max = 255)) # ラベンダ
pie(x, clockwise = T)

p <- x / sum(x) * 100
pie(p, labels = paste(names(p), round(p, 1), '%'), clockwise = T, main = 'ある金魚屋の売り上げ')
library(plotly)
## 要求されたパッケージ ggplot2 をロード中です
##
## 次のパッケージを付け加えます: 'plotly'
## 以下のオブジェクトは 'package:ggplot2' からマスクされています:
##
## last_plot
## 以下のオブジェクトは 'package:stats' からマスクされています:
##
## filter
## 以下のオブジェクトは 'package:graphics' からマスクされています:
##
## layout

plot_ly(type = 'pie', textinfo = 'label+percent', values = x, labels = names(x)) |>
layout(title = 'ある金魚屋の売り上げ')