Skip to content

Graph to show that very few classes has maximum best performers

4 messages · Sunita22, Jim Lemon, Sunita Patil

#
Hello

I need help for the following:

my data is
class no. best performers
101      10
102      21
103       1
104       3
105       5
106    190
...    ...
...    ...
...    ...
...    ...

I want to plot a graph using R, to show that very few classes has maximum
best performers. can someone guide me for this? I tried using cumulative
frequencies and then plotting a graph but it does not serve the purpose.

Thank you in advance

Regards,
Sunita
#
On 11/05/2009 03:40 AM, Sunita22 wrote:
Hi Sunita,
Maybe this will do what you want:

sundat
   class_no best_performers
1      101              10
2      102              21
3      103               1
4      104               3
5      105               5
6      106             190

library(plotrix)
staircase.plot(sundat$best_performers,
  labels=paste("Class",sundat$class_no),
  inc.col="blue",direction="s",
  totals=c(TRUE,rep(FALSE,dim(sundat)[1]-1)),
  main="Best performers by class")

Jim
#
On 11/05/2009 03:14 PM, Sunita Patil wrote:
Hi Sunita,
I don't think that staircase.plot will be suitable for 150 values unless 
you define a very large device of almost a meter in the direction of 
plotting. Try this and see how you like it:

x11(width=15,height=4)
plot(sundat$class_no,sundat$best_performers,
  type="h",xaxt="n",xlab="Class number",
  ylab="Number of best performers",
  main="Best performers by class")
library(plotrix)
staxlab(at=class_no,labels=class_no,
  nlines=3,line.spacing=0.5,cex=0.5)

Jim