Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/76.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函数?图形显示为零_R_Bar Chart - Fatal编程技术网

在条形图平台中是否有R函数?图形显示为零

在条形图平台中是否有R函数?图形显示为零,r,bar-chart,R,Bar Chart,我正在用barplot绘制一些测试结果。学生可以得到0到10分。我想展示一下每个测试等级有多少学生。例如,即使任何学生得了零分。 如何在代码中执行此操作 barras2<-table(dados$Nota) barras2 barplot(barras2) bp2 <- barplot(barras2, xlab="Notas", ylab="Quantidade de Alunos", main="Di

我正在用barplot绘制一些测试结果。学生可以得到0到10分。我想展示一下每个测试等级有多少学生。例如,即使任何学生得了零分。 如何在代码中执行此操作

barras2<-table(dados$Nota)
barras2
barplot(barras2)
bp2 <- barplot(barras2, xlab="Notas", ylab="Quantidade de Alunos",
               main="Distribuição das Notas", xlim = c(0,13), ylim = c(0,20), col=topo.colors(10))
text(bp2, barras2, labels=barras2, pos=3)

如何显示零结果?或者对于其他结果,是否显示了每个等级的结果?

您将
dados$Nota
作为一个系数,
表格(系数(dados$Nota,级别=0:10))
 1  2  3  4  5  6  7  8  9 10 
 3  1  4  4  1  9  2 15  3 19