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语言作图实现?顺便再美化一下?? 展开
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语言作图实现?顺便再美化一下?? 展开
展开全部
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="森林面积(万公顷)" )
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="森林面积(万公顷)" )
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询