Re: [R] help with subscript on axis lables

2014-10-03 Thread peter dalgaard
On 03 Oct 2014, at 13:15 , Andras Farkas wrote: > Dear All, > wonder if you could help with the following:we have:vals <- 1:5names(vals) <- > paste0("ke",1:length(vals))mp <- barplot(vals, ylim = c(0, > 6),ylab=expression(paste("Hour"^"-10"))) > > In would like to make the numbers (ke1 to ke5

Re: [R] help with subscript on axis lables

2014-10-03 Thread Adams, Jean
Andras, There may be an easier way to do this, but this works. vals <- 1:5 names(vals) <- paste0("ke",1:length(vals)) mp <- barplot(vals, ylim = c(0, 6), ylab=expression(Hour^-10), names.arg="") sapply(vals, function(i) axis(1, at=mp[i], substitute(list(ke[x]), list(x=i)), tick=FALSE)) Jean On

[R] help with subscript on axis lables

2014-10-03 Thread Andras Farkas
Dear All, wonder if you could help with the following:we have:vals <- 1:5names(vals) <- paste0("ke",1:length(vals))mp <- barplot(vals, ylim = c(0, 6),ylab=expression(paste("Hour"^"-10"))) In would like to make the numbers (ke1 to ke5, respectively) in the labels of the x axis a subscript. There