Thank you Dennis,
Great tip about dput.
So here is hopefully a better example so people can understand what I am trying to do:
dataset1=structure(list(x = c(27.6, 31.1, 23.2, 22.5, 23.5, 22.3, 24.6,
22.5, 24.6, 15, 6.6, 7.1, 7.4, 21, 21.2, 21.3, 28.3, 28.4, 28.6,
26.9), y = c(260.4, 648.5, 254.2, 250.6, 244.1, 265.4, 507.8,
407.6, 896.1, 54.2, 26.9, 39, 45.8, 131.1, 135.2, 134, 526.5,
580.8, 481.4, 476.9), site = structure(c(1L, 2L, 1L, 2L, 1L,
2L, 1L, 2L, 1L, 2L, 1L, 2L, 1L, 2L, 1L, 2L, 1L, 2L, 1L, 2L), class = "factor", .Label = c("A",
"B"))), .Names = c("x", "y", "site"), row.names = c(NA, -20L), class = "data.frame")
library(ggplot2) #load library
#create plot of log y against log x with the shape of the points specified by variable shape.
#Make shapes of size 4 and partially transparent
a=ggplot(dataset1, aes(log10(x), log10(y),group=site))+geom_point(aes(shape=site), size = 4, alpha = I(0.5))
#to a add a line for the linear model of log y against log x ignoring site.
b=a+geom_smooth(aes(log10(x), log10(y),group=1), method=lm)
#backtransform b so now on arithmetic scales
g=b+coord_trans(x="pow10",y="pow10")
#print b and g next to each other
grid.newpage()
pushViewport(viewport(layout=grid.layout(1,2)))
vplayout=function(x,y)
viewport(layout.pos.row=x,layout.pos.col=y)
print(b,vp=vplayout(1,1))
print(g,vp=vplayout(1,2))
This produces two plots that look exactly as I would like, except I would like the scale labels on the backtransformed plot (g) to be an arithmetic scale not a backtransformed log scale. I would like the tick marks to be equally spaced, and the tick labels to go from 5 to 35 rather than be in scientific format. I had a look at the link you posted Denis, and I didnt get much further.
Cheers
Kirsty