r语言绘制直方图的问题。 10

x<-c("北京","天津","河北","山西","内蒙古","辽宁","吉林","黑龙江","上海","江苏","浙江","安徽","福建","江西","山东","河南... x<-c("北京","天津","河北","山西","内蒙古","辽宁","吉林","黑龙江","上海","江苏","浙江","安徽","福建","江西","山东","河南","湖北","湖南","广东","广西","海南","重庆","四川","贵州","云南","西藏","陕西","甘肃","青海","宁夏","新疆")
y<-c(58.81,11.16,439.33,284.41,2487.90,557.31,763.87,1962.13,6.81,162.10,601.36,380.42,801.27,1001.81,254.60,39.07,713.86,1011.94,906.13,1342.70,187.77,316.44,1703.74,653.35,1914.19,1471.56,853.24,507.45,406.39,61.80,698.25)
plot(x,y,type="h",xlab="省市",ylab="森林面积(万公顷)")

我想画一个直方图,纵轴是森林面积,横轴显示不同的省市名称(汉字),如何用r语言作图实现?顺便再美化一下??
展开
 我来答
百度网友036586e
2017-12-17
知道答主
回答量:20
采纳率:100%
帮助的人:10.4万
展开全部
x<-c("北京","天津","河北","山西","内蒙古","辽宁","吉林","黑龙江","上海","江苏","浙江","安徽","福建","江西","山东","河南","湖北","湖南","广东","广西","海南","重庆","四川","贵州","云南","西藏","陕西","甘肃","青海","宁夏","新疆")
y<-c(58.81,11.16,439.33,284.41,2487.90,557.31,763.87,1962.13,6.81,162.10,601.36,380.42,801.27,1001.81,254.60,39.07,713.86,1011.94,906.13,1342.70,187.77,316.44,1703.74,653.35,1914.19,1471.56,853.24,507.45,406.39,61.80,698.25)
barplot(y,names.arg=x,xlab="省市",ylab="森林面积(万公顷)" )
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式