[R] Adding exponents (superscript format) to a plot

John Kane jrkrideau at yahoo.ca
Fri Jun 22 13:44:23 CEST 2007


# Using expression to add superscipts to the labels

vec=c(1,10,100,1000,10000,100000,1000000,10000000)
  plot(vec,vec,log="xy", axes=F)
 axis(1, at=10^c(0,2,4,6), labels=expression(1, 10^2,
10^4, 10^6))
 axis(2, at=10^c(0,2,4,6), labels=expression(1, 10^2,
10^4, 10^6), las=1)
 box()

--- Judith Flores <juryef at yahoo.com> wrote:

> Hi,
> 
>    I need to add exponents to a label in one of the
> axes of a plot, how can I do this?
> 
> Thank you,
> 
> Judith
> 
> 
>  
>
____________________________________________________________________________________
> Food fight? Enjoy some healthy debate
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained,
> reproducible code.
>



More information about the R-help mailing list