Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ssl/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
R 制作饼图';s轮廓在有光泽的表面上更平滑_R_Ggplot2_Pie Chart - Fatal编程技术网

R 制作饼图';s轮廓在有光泽的表面上更平滑

R 制作饼图';s轮廓在有光泽的表面上更平滑,r,ggplot2,pie-chart,R,Ggplot2,Pie Chart,我正在尝试使用ggplot2 代码如下: library("ggplot2") library("ggthemes") ## for theme_economist df <- data.frame(origin=c('with','without'),value=c(24536,50456)) pie <- ggplot(df, aes(x = "",y=value, fill = origin))+ geom_bar(width = 1,stat="identit

我正在尝试使用
ggplot2

代码如下:

library("ggplot2")
library("ggthemes") ## for theme_economist
df <- data.frame(origin=c('with','without'),value=c(24536,50456))  
pie <- ggplot(df, aes(x = "",y=value, fill = origin))+  
    geom_bar(width = 1,stat="identity")+  
    coord_polar(theta = "y",start=pi/3)+  
    theme_economist()
库(“ggplot2”)
图书馆(“ggthemes”)###为Themes#U经济学家

df要提高屏幕上绘图的分辨率,必须将
res
参数设置为其默认值72。这对我来说没有多大意义,但效果很好,分辨率从非常差变为非常好
但是,进一步增加其值可能会导致图像失真。

现在看来,在导出打印对象或将其渲染为闪亮之前,您无法更改打印对象本身的分辨率。

我编辑了我的问题,使其切中要害,请您发布/链接到实际图像好吗?当我运行你的代码时,我得到了。你在看什么样的输出,分辨率是多少?我把图像放在一个闪亮的应用程序中,我不知道为什么它看起来没有你的那么好。有没有办法简单地改变ggplot的分辨率?你提到了我发现的分辨率,这似乎基本上是同一个问题,所以它取决于输出你知道用什么方法来显示它吗在Shiny中使用
renderPlot()
时分辨率高?