opensubscriber
   Find in this group all groups
 
Unknown more information…

r : r-help@r-project.org 22 June 2012 • 10:54PM -0400

[R] Boxplot with Log10 and base-exponent axis
by Luigi

REPLY TO AUTHOR
 
REPLY TO GROUP




Dear all,

I would like to (i) produce boxplot graphs with axis in logarithm in base 10
and (ii) showing the values on the axis in 10^exponent format rather than
10E+exponent.



To illustrate with an example, I have some widely spread data that I chart
plot using  boxplot() [figure on the left]; the log="y" option of boxplot()
I obtained the natural logarithm conversion of the data and the unfriendly
notation baseE+exponent [figure on the centre]; if I log10 the data I obtain
the desired plot, but the axis are showing only the exponent. [figure on the
right].



Can anybody help?



Best regards

Luigi Marongiu, MSc



########### EXAMPLE ############

# generationg random numbers

x<-runif(100, min=0, max=100000)



# create plot

par(mfrow = c(1,3))



#plotting in the left side

boxplot(x, xlab="Linear values")



#plotting in the centre

boxplot(x, log = "y", xlab="y axis logged")



# creating log10 values and plotting on the right side

Log.base10.x<-log10(x)

boxplot(Log.base10.x, xlab="LOG10 of data")






[[alternative HTML version deleted]]

______________________________________________
R-help@r-pr... 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.

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.