如何改变R语言中由pie函数生成的饼图中各扇形标签的颜色和文本大小呢?
0
R语言程序代码如下:
slices<-c(10,12,4,16,8)
lbls<-c("US","UK","Australia","Germany","France")
pie(slices,labels=lbls,main="simple Pie Chart",
col.main="blue",col.axis="blue",col.lab="blue",
cex.main=2,cex.axis=100,cex.lab=100)
生成的图像如下所示:
请问如何改变各扇形标签的颜色和文本大小呢?
即改变"US","UK","Australia","Germany","France"的颜色和文本大小?
slices<-c(10,12,4,16,8)
lbls<-c("US","UK","Australia","Germany","France")
pie(slices,labels=lbls,main="simple Pie Chart",
col.main="blue",col.axis="blue",col.lab="blue",
cex.main=2,cex.axis=100,cex.lab=100)
生成的图像如下所示:
请问如何改变各扇形标签的颜色和文本大小呢?
即改变"US","UK","Australia","Germany","France"的颜色和文本大小?
没有找到相关结果
重要提示:提问者不能发表回复,可以通过评论与回答者沟通,沟通后可以通过编辑功能完善问题描述,以便后续其他人能够更容易理解问题.
1 个回复
marxsong 2016-11-09 回答
赞同来自:
示例如下:
slices<-c(10,12,4,16,8)
lbls<-c("US","UK","Australia","Germany","France")
pie(slices,labels=lbls,main="simple Pie Chart",col = rainbow(5),
col.main="blue", cex.main=2,cex=3)