g<-g+xlab('Genomic mutation rate')+ylab('Relative fitness')
g<-g+coord_trans(y='log')+ylim(.25,1)+xlim(0,2)+opts(axis.text.x=theme_text(vjust=8),axis.text.y=theme_text(hjust=8))
postscript('fitvu_steep.ps', onefile=FALSE,horizontal=FALSE,paper="special",width=8,height=7)
print(g)          
dev.off()
lh_df<-data.frame(w=lhw,u=h1u)
lh_km<-data.frame(u=c(h1u,h1u),km=c(exp(-h1u*atop_lhrd_fd),exp(-atot_lhrd_fd*h1u)),
                   Legend=factor(rep(c('db','dn'),each=length(h1u)),levels=c('dn','db')))          
g<-qplot(h1u,lhw)+geom_line(data=lh_km,aes(x=u,y=km,linetype=Legend))
g<-g+scale_linetype('',breaks=c('dn','db'),labels=c("Estimate using " ~ D[n],"Estimate using "~ D[b]))
g<-g+theme_bw(36)+pub_theme+opts(legend.position=c(.8,.9),legend.key=theme_blank())
g<-g+xlab('Genomic mutation rate')+ylab('Relative fitness')
g<-g+coord_trans(y='log')+ylim(.25,1)+xlim(0,2)+opts(axis.text.x=theme_text(vjust=16),axis.text.y=theme_text(hjust=16))
postscript('fitvu_steep.ps', onefile=FALSE,horizontal=FALSE,paper="special",width=8,height=7)
print(g)          
dev.off()
lh_df<-data.frame(w=lhw,u=h1u)
lh_km<-data.frame(u=c(h1u,h1u),km=c(exp(-h1u*atop_lhrd_fd),exp(-atot_lhrd_fd*h1u)),
                   Legend=factor(rep(c('db','dn'),each=length(h1u)),levels=c('dn','db')))          
g<-qplot(h1u,lhw)+geom_line(data=lh_km,aes(x=u,y=km,linetype=Legend))
g<-g+scale_linetype('',breaks=c('dn','db'),labels=c("Estimate using " ~ D[n],"Estimate using "~ D[b]))
g<-g+theme_bw(36)+pub_theme+opts(legend.position=c(.8,.9),legend.key=theme_blank())
g<-g+xlab('Genomic mutation rate')+ylab('Relative fitness')
g<-g+coord_trans(y='log')+ylim(.25,1)+xlim(0,2)+opts(axis.text.x=theme_text(lineheight=16),axis.text.y=theme_text(lineheight=16))
print(g) 
lh_df<-data.frame(w=lhw,u=h1u)
lh_km<-data.frame(u=c(h1u,h1u),km=c(exp(-h1u*atop_lhrd_fd),exp(-atot_lhrd_fd*h1u)),
                   Legend=factor(rep(c('db','dn'),each=length(h1u)),levels=c('dn','db')))          
g<-qplot(h1u,lhw)+geom_line(data=lh_km,aes(x=u,y=km,linetype=Legend))
g<-g+scale_linetype('',breaks=c('dn','db'),labels=c("Estimate using " ~ D[n],"Estimate using "~ D[b]))
g<-g+theme_bw(36)+pub_theme+opts(legend.position=c(.8,.9),legend.key=theme_blank())
g<-g+xlab('Genomic mutation rate')+ylab('Relative fitness')
g<-g+coord_trans(y='log')+ylim(.25,1)+xlim(0,2) #+opts(axis.text.x=theme_text(lineheight=16),axis.text.y=theme_text(lineheight=16))
print(g)   
lh_df<-data.frame(w=lhw,u=h1u)
lh_km<-data.frame(u=c(h1u,h1u),km=c(exp(-h1u*atop_lhrd_fd),exp(-atot_lhrd_fd*h1u)),
                   Legend=factor(rep(c('db','dn'),each=length(h1u)),levels=c('dn','db')))          
g<-qplot(h1u,lhw)+geom_line(data=lh_km,aes(x=u,y=km,linetype=Legend))
g<-g+scale_linetype('',breaks=c('dn','db'),labels=c("Estimate using " ~ D[n],"Estimate using "~ D[b]))
g<-g+theme_bw(36)+pub_theme+opts(legend.position=c(.8,.9),legend.key=theme_blank())
g<-g+xlab('Genomic mutation rate')+ylab('Relative fitness')
g<-g+coord_trans(y='log')+ylim(.25,1)+xlim(0,2) 
g<-g+opts(axis.text.x=theme_text(lineheight=1),axis.text.y=theme_text(lineheight=1))
print(g)     
lh_df<-data.frame(w=lhw,u=h1u)
lh_km<-data.frame(u=c(h1u,h1u),km=c(exp(-h1u*atop_lhrd_fd),exp(-atot_lhrd_fd*h1u)),
                   Legend=factor(rep(c('db','dn'),each=length(h1u)),levels=c('dn','db')))          
g<-qplot(h1u,lhw)+geom_line(data=lh_km,aes(x=u,y=km,linetype=Legend))
g<-g+scale_linetype('',breaks=c('dn','db'),labels=c("Estimate using " ~ D[n],"Estimate using "~ D[b]))
g<-g+theme_bw(36)+pub_theme+opts(legend.position=c(.8,.9),legend.key=theme_blank())
g<-g+xlab('Genomic mutation rate')+ylab('Relative fitness')
g<-g+coord_trans(y='log')+ylim(.25,1)+xlim(0,2) 
g<-g+opts(axis.text.x=theme_text(lineheight=.7),axis.text.y=theme_text(lineheight=.7))
print(g)   
lh_df<-data.frame(w=lhw,u=h1u)
lh_km<-data.frame(u=c(h1u,h1u),km=c(exp(-h1u*atop_lhrd_fd),exp(-atot_lhrd_fd*h1u)),
                   Legend=factor(rep(c('db','dn'),each=length(h1u)),levels=c('dn','db')))          
g<-qplot(h1u,lhw)+geom_line(data=lh_km,aes(x=u,y=km,linetype=Legend))
g<-g+scale_linetype('',breaks=c('dn','db'),labels=c("Estimate using " ~ D[n],"Estimate using "~ D[b]))
g<-g+theme_bw(36)+pub_theme+opts(legend.position=c(.8,.9),legend.key=theme_blank())
g<-g+xlab('Genomic mutation rate')+ylab('Relative fitness')
g<-g+coord_trans(y='log')+ylim(.25,1)+xlim(0,2) 
g<-g+opts(axis.text.x=theme_text(lineheight=1),axis.text.y=theme_text(lineheight=1))
g<-g+opts(axis.title.x=theme_text(size=base_size*.8),axis.title.y=theme_text(size=base_size*.8))
print(g)    
lh_df<-data.frame(w=lhw,u=h1u)
lh_km<-data.frame(u=c(h1u,h1u),km=c(exp(-h1u*atop_lhrd_fd),exp(-atot_lhrd_fd*h1u)),
                   Legend=factor(rep(c('db','dn'),each=length(h1u)),levels=c('dn','db')))          
g<-qplot(h1u,lhw)+geom_line(data=lh_km,aes(x=u,y=km,linetype=Legend))
g<-g+scale_linetype('',breaks=c('dn','db'),labels=c("Estimate using " ~ D[n],"Estimate using "~ D[b]))
g<-g+theme_bw(36)+pub_theme+opts(legend.position=c(.8,.9),legend.key=theme_blank())
g<-g+xlab('Genomic mutation rate')+ylab('Relative fitness')
g<-g+coord_trans(y='log')+ylim(.25,1)+xlim(0,2) 
g<-g+opts(axis.text.x=theme_text(lineheight=1),axis.text.y=theme_text(lineheight=1))
g<-g+opts(axis.title.x=theme_text(size=28),axis.title.y=theme_text(size=28))
print(g)   
lh_df<-data.frame(w=lhw,u=h1u)
lh_km<-data.frame(u=c(h1u,h1u),km=c(exp(-h1u*atop_lhrd_fd),exp(-atot_lhrd_fd*h1u)),
                   Legend=factor(rep(c('db','dn'),each=length(h1u)),levels=c('dn','db')))          
g<-qplot(h1u,lhw)+geom_line(data=lh_km,aes(x=u,y=km,linetype=Legend))
g<-g+scale_linetype('',breaks=c('dn','db'),labels=c("Estimate using " ~ D[n],"Estimate using "~ D[b]))
g<-g+theme_bw(36)+pub_theme+opts(legend.position=c(.8,.9),legend.key=theme_blank())
g<-g+xlab('Genomic mutation rate')+ylab('Relative fitness')
g<-g+coord_trans(y='log')+ylim(.25,1)+xlim(0,2) 
g<-g+opts(axis.text.x=theme_text(lineheight=1),axis.text.y=theme_text(lineheight=1))
#g<-g+opts(axis.title.x=theme_text(size=28),axis.title.y=theme_text(size=28))
print(g)   
lh_df<-data.frame(w=lhw,u=h1u)
lh_km<-data.frame(u=c(h1u,h1u),km=c(exp(-h1u*atop_lhrd_fd),exp(-atot_lhrd_fd*h1u)),
                   Legend=factor(rep(c('db','dn'),each=length(h1u)),levels=c('dn','db')))          
g<-qplot(h1u,lhw)+geom_line(data=lh_km,aes(x=u,y=km,linetype=Legend))
g<-g+scale_linetype('',breaks=c('dn','db'),labels=c("Estimate using " ~ D[n],"Estimate using "~ D[b]))
g<-g+theme_bw(36)+pub_theme+opts(legend.position=c(.8,.9),legend.key=theme_blank())
g<-g+xlab('Genomic mutation rate')+ylab('Relative fitness')
g<-g+coord_trans(y='log')+ylim(.25,1)+xlim(0,2) 
#g<-g+opts(axis.text.x=theme_text(lineheight=1),axis.text.y=theme_text(lineheight=1))
#g<-g+opts(axis.title.x=theme_text(size=28),axis.title.y=theme_text(size=28))
print(g)  
lh_df<-data.frame(w=lhw,u=h1u)
lh_km<-data.frame(u=c(h1u,h1u),km=c(exp(-h1u*atop_lhrd_fd),exp(-atot_lhrd_fd*h1u)),
                   Legend=factor(rep(c('db','dn'),each=length(h1u)),levels=c('dn','db')))          
g<-qplot(h1u,lhw)+geom_line(data=lh_km,aes(x=u,y=km,linetype=Legend))
g<-g+opts(axis.text.x=theme_text(lineheight=1),axis.text.y=theme_text(lineheight=1))
g<-g+scale_linetype('',breaks=c('dn','db'),labels=c("Estimate using " ~ D[n],"Estimate using "~ D[b]))
g<-g+theme_bw(36)+pub_theme+opts(legend.position=c(.8,.9),legend.key=theme_blank())
g<-g+xlab('Genomic mutation rate')+ylab('Relative fitness')
g<-g+coord_trans(y='log')+ylim(.25,1)+xlim(0,2) 
#g<-g+opts(axis.title.x=theme_text(size=28),axis.title.y=theme_text(size=28))
print(g) 
lh_df<-data.frame(w=lhw,u=h1u)
lh_km<-data.frame(u=c(h1u,h1u),km=c(exp(-h1u*atop_lhrd_fd),exp(-atot_lhrd_fd*h1u)),
                   Legend=factor(rep(c('db','dn'),each=length(h1u)),levels=c('dn','db')))          
g<-qplot(h1u,lhw)+geom_line(data=lh_km,aes(x=u,y=km,linetype=Legend))
g<-g+opts(axis.text.x=theme_text(lineheight=1.5),axis.text.y=theme_text(lineheight=1.5))
g<-g+scale_linetype('',breaks=c('dn','db'),labels=c("Estimate using " ~ D[n],"Estimate using "~ D[b]))
g<-g+theme_bw(36)+pub_theme+opts(legend.position=c(.8,.9),legend.key=theme_blank())
g<-g+xlab('Genomic mutation rate')+ylab('Relative fitness')
g<-g+coord_trans(y='log')+ylim(.25,1)+xlim(0,2) 
#g<-g+opts(axis.title.x=theme_text(size=28),axis.title.y=theme_text(size=28))
print(g)    
lh_df<-data.frame(w=lhw,u=h1u)
lh_km<-data.frame(u=c(h1u,h1u),km=c(exp(-h1u*atop_lhrd_fd),exp(-atot_lhrd_fd*h1u)),
                   Legend=factor(rep(c('db','dn'),each=length(h1u)),levels=c('dn','db')))          
g<-qplot(h1u,lhw)+geom_line(data=lh_km,aes(x=u,y=km,linetype=Legend))
g<-g+opts(axis.text.x=theme_text(lineheight=2.5),axis.text.y=theme_text(lineheight=2.5))
g<-g+scale_linetype('',breaks=c('dn','db'),labels=c("Estimate using " ~ D[n],"Estimate using "~ D[b]))
g<-g+theme_bw(36)+pub_theme+opts(legend.position=c(.8,.9),legend.key=theme_blank())
g<-g+xlab('Genomic mutation rate')+ylab('Relative fitness')
g<-g+coord_trans(y='log')+ylim(.25,1)+xlim(0,2) 
lh_df<-data.frame(w=lhw,u=h1u)
lh_km<-data.frame(u=c(h1u,h1u),km=c(exp(-h1u*atop_lhrd_fd),exp(-atot_lhrd_fd*h1u)),
                   Legend=factor(rep(c('db','dn'),each=length(h1u)),levels=c('dn','db')))          
g<-qplot(h1u,lhw)+geom_line(data=lh_km,aes(x=u,y=km,linetype=Legend))
g<-g+opts(axis.text.x=theme_text(vjust=2.5),axis.text.y=theme_text(hjust=2.5))
g<-g+scale_linetype('',breaks=c('dn','db'),labels=c("Estimate using " ~ D[n],"Estimate using "~ D[b]))
g<-g+theme_bw(36)+pub_theme+opts(legend.position=c(.8,.9),legend.key=theme_blank())
g<-g+xlab('Genomic mutation rate')+ylab('Relative fitness')
g<-g+coord_trans(y='log')+ylim(.25,1)+xlim(0,2) 
#g<-g+opts(axis.title.x=theme_text(size=28),axis.title.y=theme_text(size=28))
print(g)     
lh_df<-data.frame(w=lhw,u=h1u)
lh_km<-data.frame(u=c(h1u,h1u),km=c(exp(-h1u*atop_lhrd_fd),exp(-atot_lhrd_fd*h1u)),
                   Legend=factor(rep(c('db','dn'),each=length(h1u)),levels=c('dn','db')))          
g<-qplot(h1u,lhw)+geom_line(data=lh_km,aes(x=u,y=km,linetype=Legend))
g<-g+opts(axis.text.x=theme_text(vjust=10),axis.text.y=theme_text(hjust=10))
g<-g+scale_linetype('',breaks=c('dn','db'),labels=c("Estimate using " ~ D[n],"Estimate using "~ D[b]))
g<-g+theme_bw(36)+pub_theme+opts(legend.position=c(.8,.9),legend.key=theme_blank())
g<-g+xlab('Genomic mutation rate')+ylab('Relative fitness')
g<-g+coord_trans(y='log')+ylim(.25,1)+xlim(0,2) 
#g<-g+opts(axis.title.x=theme_text(size=28),axis.title.y=theme_text(size=28))
print(g)  
lh_df<-data.frame(w=lhw,u=h1u)
lh_km<-data.frame(u=c(h1u,h1u),km=c(exp(-h1u*atop_lhrd_fd),exp(-atot_lhrd_fd*h1u)),
                   Legend=factor(rep(c('db','dn'),each=length(h1u)),levels=c('dn','db')))          
g<-qplot(h1u,lhw)+geom_line(data=lh_km,aes(x=u,y=km,linetype=Legend))
g<-g+opts(axis.text.x=theme_text(lineheight=10),axis.text.y=theme_text(lineheight=10))
g<-g+scale_linetype('',breaks=c('dn','db'),labels=c("Estimate using " ~ D[n],"Estimate using "~ D[b]))
g<-g+theme_bw(36)+pub_theme+opts(legend.position=c(.8,.9),legend.key=theme_blank())
g<-g+xlab('Genomic mutation rate')+ylab('Relative fitness')
g<-g+coord_trans(y='log')+ylim(.25,1)+xlim(0,2) 
#g<-g+opts(axis.title.x=theme_text(size=28),axis.title.y=theme_text(size=28))
print(g)     
lh_df<-data.frame(w=lhw,u=h1u)
lh_km<-data.frame(u=c(h1u,h1u),km=c(exp(-h1u*atop_lhrd_fd),exp(-atot_lhrd_fd*h1u)),
                   Legend=factor(rep(c('db','dn'),each=length(h1u)),levels=c('dn','db')))          
g<-qplot(h1u,lhw)+geom_line(data=lh_km,aes(x=u,y=km,linetype=Legend))
#g<-g+opts(axis.text.x=theme_text(lineheight=10),axis.text.y=theme_text(lineheight=10))
g<-g+scale_linetype('',breaks=c('dn','db'),labels=c("Estimate using " ~ D[n],"Estimate using "~ D[b]))
g<-g+theme_bw(32)+pub_theme+opts(legend.position=c(.8,.9),legend.key=theme_blank())
g<-g+xlab('Genomic mutation rate')+ylab('Relative fitness')
g<-g+coord_trans(y='log')+ylim(.25,1)+xlim(0,2) 
#g<-g+opts(axis.title.x=theme_text(size=28),axis.title.y=theme_text(size=28))
print(g)    
?postscript
lh_df<-data.frame(w=lhw,u=h1u)
lh_km<-data.frame(u=c(h1u,h1u),km=c(exp(-h1u*atop_lhrd_fd),exp(-atot_lhrd_fd*h1u)),
                   Legend=factor(rep(c('db','dn'),each=length(h1u)),levels=c('dn','db')))          
g<-qplot(h1u,lhw,size=3)+geom_line(data=lh_km,aes(x=u,y=km,linetype=Legend),size=3)
#g<-g+opts(axis.text.x=theme_text(lineheight=10),axis.text.y=theme_text(lineheight=10))
g<-g+scale_linetype('',breaks=c('dn','db'),labels=c("Estimate using " ~ D[n],"Estimate using "~ D[b]))
g<-g+theme_bw()+pub_theme+opts(legend.position=c(.8,.9),legend.key=theme_blank())
g<-g+xlab('Genomic mutation rate')+ylab('Relative fitness')
g<-g+coord_trans(y='log')+ylim(.25,1)+xlim(0,2) 
#g<-g+opts(axis.title.x=theme_text(size=28),axis.title.y=theme_text(size=28))
postscript('fitvu_steep.ps', onefile=FALSE,horizontal=FALSE,paper="special",width=8,height=7,pointsize=24)
print(g)          
dev.off()
dev.off()
lh_df<-data.frame(w=lhw,u=h1u)
lh_km<-data.frame(u=c(h1u,h1u),km=c(exp(-h1u*atop_lhrd_fd),exp(-atot_lhrd_fd*h1u)),
                   Legend=factor(rep(c('db','dn'),each=length(h1u)),levels=c('dn','db')))          
g<-qplot(h1u,lhw,size=3)+geom_line(data=lh_km,aes(x=u,y=km,linetype=Legend),size=3)
#g<-g+opts(axis.text.x=theme_text(lineheight=10),axis.text.y=theme_text(lineheight=10))
g<-g+scale_linetype('',breaks=c('dn','db'),labels=c("Estimate using " ~ D[n],"Estimate using "~ D[b]))
g<-g+theme_bw()+pub_theme+opts(legend.position=c(.8,.9),legend.key=theme_blank())
g<-g+xlab('Genomic mutation rate')+ylab('Relative fitness')
g<-g+coord_trans(y='log')+ylim(.25,1)+xlim(0,2) 
#g<-g+opts(axis.title.x=theme_text(size=28),axis.title.y=theme_text(size=28))
postscript('fitvu_steep.ps', onefile=FALSE,horizontal=FALSE,paper="special",width=8,height=7,pointsize=24)
print(g)          
dev.off()
lh_df<-data.frame(w=lhw,u=h1u)
lh_km<-data.frame(u=c(h1u,h1u),km=c(exp(-h1u*atop_lhrd_fd),exp(-atot_lhrd_fd*h1u)),
                   Legend=factor(rep(c('db','dn'),each=length(h1u)),levels=c('dn','db')))          
g<-qplot(h1u,lhw)+geom_line(data=lh_km,aes(x=u,y=km,linetype=Legend))
#g<-g+opts(axis.text.x=theme_text(lineheight=10),axis.text.y=theme_text(lineheight=10))
g<-g+scale_linetype('',breaks=c('dn','db'),labels=c("Estimate using " ~ D[n],"Estimate using "~ D[b]))
g<-g+theme_bw()+pub_theme+opts(legend.position=c(.8,.9),legend.key=theme_blank())
g<-g+xlab('Genomic mutation rate')+ylab('Relative fitness')
g<-g+coord_trans(y='log')+ylim(.25,1)+xlim(0,2) 
#g<-g+opts(axis.title.x=theme_text(size=28),axis.title.y=theme_text(size=28))
postscript('fitvu_steep.ps', onefile=FALSE,horizontal=FALSE,paper="special",width=8,height=7,pointsize=36)
print(g)          
dev.off()
lh_df<-data.frame(w=lhw,u=h1u)
lh_km<-data.frame(u=c(h1u,h1u),km=c(exp(-h1u*atop_lhrd_fd),exp(-atot_lhrd_fd*h1u)),
                   Legend=factor(rep(c('db','dn'),each=length(h1u)),levels=c('dn','db')))          
g<-qplot(h1u,lhw)+geom_line(data=lh_km,aes(x=u,y=km,linetype=Legend))
#g<-g+opts(axis.text.x=theme_text(lineheight=10),axis.text.y=theme_text(lineheight=10))
g<-g+scale_linetype('',breaks=c('dn','db'),labels=c("Estimate using " ~ D[n],"Estimate using "~ D[b]))
g<-g+theme_bw()+pub_theme+opts(legend.position=c(.8,.9),legend.key=theme_blank())
g<-g+xlab('Genomic mutation rate')+ylab('Relative fitness')
g<-g+coord_trans(y='log')+ylim(.25,1)+xlim(0,2) 
#g<-g+opts(axis.title.x=theme_text(size=28),axis.title.y=theme_text(size=28))
postscript('fitvu_steep.ps', onefile=FALSE,horizontal=FALSE,paper="special",width=8,height=7)
print(g)          
dev.off()
lh_df<-data.frame(w=lhw,u=h1u)
lh_km<-data.frame(u=c(h1u,h1u),km=c(exp(-h1u*atop_lhrd_fd),exp(-atot_lhrd_fd*h1u)),
                   Legend=factor(rep(c('db','dn'),each=length(h1u)),levels=c('dn','db')))          
g<-qplot(h1u,lhw)+geom_line(data=lh_km,aes(x=u,y=km,linetype=Legend))
#g<-g+opts(axis.text.x=theme_text(lineheight=10),axis.text.y=theme_text(lineheight=10))
g<-g+scale_linetype('',breaks=c('dn','db'),labels=c("Estimate using " ~ D[n],"Estimate using "~ D[b]))
g<-g+theme_bw()+pub_theme+opts(legend.position=c(.8,.9),legend.key=theme_blank())
g<-g+xlab('Genomic mutation rate')+ylab('Relative fitness')
g<-g+coord_trans(y='log')+ylim(.25,1)+xlim(0,2) 
#g<-g+opts(axis.title.x=theme_text(size=28),axis.title.y=theme_text(size=28))
postscript('fitvu_steep.ps', onefile=FALSE,horizontal=FALSE,paper="special",width=8,height=7,pointsize=8)
print(g)          
dev.off()
lh_df<-data.frame(w=lhw,u=h1u)
lh_km<-data.frame(u=c(h1u,h1u),km=c(exp(-h1u*atop_lhrd_fd),exp(-atot_lhrd_fd*h1u)),
                   Legend=factor(rep(c('db','dn'),each=length(h1u)),levels=c('dn','db')))          
g<-qplot(h1u,lhw)+geom_line(data=lh_km,aes(x=u,y=km,linetype=Legend))
#g<-g+opts(axis.text.x=theme_text(lineheight=10),axis.text.y=theme_text(lineheight=10))
g<-g+scale_linetype('',breaks=c('dn','db'),labels=c("Estimate using " ~ D[n],"Estimate using "~ D[b]))
g<-g+theme_bw()+pub_theme+opts(legend.position=c(.8,.9),legend.key=theme_blank())
g<-g+xlab('Genomic mutation rate')+ylab('Relative fitness')
g<-g+coord_trans(y='log')+ylim(.25,1)+xlim(0,2) 
#g<-g+opts(axis.title.x=theme_text(size=28),axis.title.y=theme_text(size=28))
postscript('fitvu_steep.ps', onefile=FALSE,horizontal=FALSE,paper="special",width=8,height=7,pointsize=4)
print(g)          
dev.off()
?postscript
lh_df<-data.frame(w=lhw,u=h1u)
lh_km<-data.frame(u=c(h1u,h1u),km=c(exp(-h1u*atop_lhrd_fd),exp(-atot_lhrd_fd*h1u)),
                   Legend=factor(rep(c('db','dn'),each=length(h1u)),levels=c('dn','db')))          
g<-qplot(h1u,lhw)+geom_line(data=lh_km,aes(x=u,y=km,linetype=Legend))
#g<-g+opts(axis.text.x=theme_text(lineheight=10),axis.text.y=theme_text(lineheight=10))
g<-g+scale_linetype('',breaks=c('dn','db'),labels=c("Estimate using " ~ D[n],"Estimate using "~ D[b]))
g<-g+theme_bw()+pub_theme+opts(legend.position=c(.8,.9),legend.key=theme_blank())
g<-g+xlab('Genomic mutation rate')+ylab('Relative fitness')
g<-g+coord_trans(y='log')+ylim(.25,1)+xlim(0,2) 
#g<-g+opts(axis.title.x=theme_text(size=28),axis.title.y=theme_text(size=28))
postscript('fitvu_steep.ps', onefile=FALSE,horizontal=FALSE,paper="special",width=8,height=7,pointsize=16)
print(g)          
dev.off()
lh_df<-data.frame(w=lhw,u=h1u)
lh_km<-data.frame(u=c(h1u,h1u),km=c(exp(-h1u*atop_lhrd_fd),exp(-atot_lhrd_fd*h1u)),
                   Legend=factor(rep(c('db','dn'),each=length(h1u)),levels=c('dn','db')))          
g<-qplot(h1u,lhw)+geom_line(data=lh_km,aes(x=u,y=km,linetype=Legend))
#g<-g+opts(axis.text.x=theme_text(lineheight=10),axis.text.y=theme_text(lineheight=10))
g<-g+scale_linetype('',breaks=c('dn','db'),labels=c("Estimate using " ~ D[n],"Estimate using "~ D[b]))
g<-g+theme_bw(36)+pub_theme+opts(legend.position=c(.8,.9),legend.key=theme_blank())
g<-g+xlab('Genomic mutation rate')+ylab('Relative fitness')
g<-g+coord_trans(y='log')+ylim(.25,1)+xlim(0,2) 
#g<-g+opts(axis.title.x=theme_text(size=28),axis.title.y=theme_text(size=28))
postscript('fitvu_steep.ps', onefile=FALSE,horizontal=FALSE,paper="special",width=8,height=7,pointsize=16)
print(g)          
dev.off()
lh_df<-data.frame(w=lhw,u=h1u)
lh_km<-data.frame(u=c(h1u,h1u),km=c(exp(-h1u*atop_lhrd_fd),exp(-atot_lhrd_fd*h1u)),
                   Legend=factor(rep(c('db','dn'),each=length(h1u)),levels=c('dn','db')))          
g<-qplot(h1u,lhw)+geom_line(data=lh_km,aes(x=u,y=km,linetype=Legend))
#g<-g+opts(axis.text.x=theme_text(lineheight=10),axis.text.y=theme_text(lineheight=10))
g<-g+scale_linetype('',breaks=c('dn','db'),labels=c("Estimate using " ~ D[n],"Estimate using "~ D[b]))
g<-g+theme_bw(28)+pub_theme+opts(legend.position=c(.8,.9),legend.key=theme_blank())
g<-g+xlab('Genomic mutation rate')+ylab('Relative fitness')
g<-g+coord_trans(y='log')+ylim(.25,1)+xlim(0,2) 
#g<-g+opts(axis.title.x=theme_text(size=28),axis.title.y=theme_text(size=28))
postscript('fitvu_steep.ps', onefile=FALSE,horizontal=FALSE,paper="special",width=8,height=7,pointsize=16)
print(g)          
dev.off()
lh_df<-data.frame(w=lhw,u=h1u)
lh_km<-data.frame(u=c(h1u,h1u),km=c(exp(-h1u*atop_lhrd_fd),exp(-atot_lhrd_fd*h1u)),
                   Legend=factor(rep(c('db','dn'),each=length(h1u)),levels=c('dn','db')))          
g<-qplot(h1u,lhw)+geom_line(data=lh_km,aes(x=u,y=km,linetype=Legend))
#g<-g+opts(axis.text.x=theme_text(lineheight=10),axis.text.y=theme_text(lineheight=10))
g<-g+scale_linetype('',breaks=c('dn','db'),labels=c("Estimate using " ~ D[n],"Estimate using "~ D[b]))
g<-g+theme_bw(28)+pub_theme+opts(legend.position=c(.8,.9),legend.key=theme_blank())
g<-g+xlab('Genomic mutation rate')+ylab('Relative fitness')
g<-g+coord_trans(y='log')+ylim(.25,1)+xlim(0,2) 
#g<-g+opts(axis.title.x=theme_text(size=28),axis.title.y=theme_text(size=28))
postscript('fitvu_steep.ps', onefile=FALSE,horizontal=FALSE,paper="special",width=8,height=7,pointsize=16)
print(g)          
dev.off()
l2_df<-data.frame(w=exp(-al2_fd_tot*l2u),u=l2u,lab=rep('dn',length(l2u)))
g<-qplot(l2u,l2w)+geom_line(data=l2_df,aes(x=u,y=w,linetype=lab))
#g<-g+scale_linetype_manual('',values=c("Estimate using " ~ D[n]))
g<-g+scale_linetype('',breaks=c('dn'),labels=c('Estimate using ' ~D[n]))
g<-g+xlab('Genomic mutation rate')+ylab('Relative fitness')
g<-g+coord_trans(y='log')+ylim(.24,1)+xlim(0,2.6)
g<-g+theme_bw(28)+pub_theme+opts(legend.position=c(.8,.9),legend.key=theme_blank())
postscript('fitvu_shallow.ps',onefile=FALSE,horizontal=FALSE,paper="special",width=8,height=7,pointsize=16)
print(g)
dev.off()
?diff
diff(1:10,2)
diff(1:10)
diff(c(0,4,8))
diff(c(0,4,8,10))
?geom_tile
.025*20
.05*20
19*.5+.025
19*.05+.025
ls()
ml2_dis<-read.csv('ml2_fit_dis.csv')
names(ml2_dis)
qplot(U,fitness,data=ml2_dis,fill=num_ind,width=w)
qplot(U,fitness,data=ml2_dis,fill=num_ind,width=width)
qplot(U,fitness,data=ml2_dis,fill=num_ind,width=width,geom='tile')
qplot(U,fitness,data=ml2_dis,fill=num_ind,width=width,geom='tile')+scale_colour_grey()
qplot(U,fitness,data=ml2_dis,fill=num_ind,width=width,geom='tile')+scale_fill_grey()
qplot(U,fitness,data=ml2_dis,fill=num_ind,width=width,geom='tile')+scale_fill_continuous(low='white',high='black')
max(ml2_dis$fitness)
ml2_dis<-read.csv('ml2_fit_dis.csv')
qplot(U,fitness,data=ml2_dis,fill=num_ind,width=width,geom='tile')+scale_fill_continuous(low='white',high='black')
qplot(U,fitness,data=ml2_dis,fill=num_ind,width=width,geom='tile')+scale_fill_continuous('Individuals',low='white',high='black')
max(ml2_dis(U)
)
max(ml2_dis$U)
l2u
g<-qplot(U,fitness,data=ml2_dis,fill=num_ind,width=width,geom='tile')
g<-g+scale_fill_continuous('Individuals',low='white',high='black')
g<-g+xlab('Genomic mutation rate')+ylab('Relative fitness')
g<-g+xlim(0,1.553868)+ylim(0,1)
print(g)
ml2_dis<-read.csv('ml2_fit_dis.csv')
g<-qplot(U,fitness,data=ml2_dis,fill=num_ind,width=width,geom='tile')
g<-g+scale_fill_continuous('Individuals',low='white',high='black')
g<-g+xlab('Genomic mutation rate')+ylab('Relative fitness')
g<-g+xlim(0,1.56)+ylim(0,1)
print(g)
ml2_dis<-read.csv('ml2_fit_dis.csv')
g<-qplot(U,fitness,data=ml2_dis,fill=num_ind,width=width,geom='tile')
g<-g+scale_fill_continuous('Individuals',low='white',high='black')
g<-g+xlab('Genomic mutation rate')+ylab('Relative fitness')
g<-g+coord_cartisian(xlim(0,1.56),ylim(0,1))
g<-qplot(U,fitness,data=ml2_dis,fill=num_ind,width=width,geom='tile')
g<-g+scale_fill_continuous('Individuals',low='white',high='black')
g<-g+xlab('Genomic mutation rate')+ylab('Relative fitness')
g<-g+coord_cartesian(xlim(0,1.56),ylim(0,1))
print(g)
g<-qplot(U,fitness,data=ml2_dis,fill=num_ind,width=width,geom='tile')
g<-g+scale_fill_continuous('Individuals',low='white',high='black')
g<-g+xlab('Genomic mutation rate')+ylab('Relative fitness')
g<-g+coord_cartesian(xlim=c(0,1.56),ylim=c(0,1))
print(g)
ml2_dis<-read.csv('ml2_fit_dis.csv')
g<-qplot(U,fitness,data=ml2_dis,fill=num_ind,width=width,geom='tile')
g<-g+scale_fill_continuous('Individuals',low='white',high='black')
g<-g+xlab('Genomic mutation rate')+ylab('Relative fitness')
g<-g+coord_cartesian(xlim=c(0,1.56),ylim=c(0,1))
g<-g+theme_bw(28)+pub_theme
print(g)
ml2_dis<-read.csv('ml2_fit_dis.csv')
g<-qplot(U,fitness,data=ml2_dis,fill=num_ind,width=width,geom='tile')
g<-g+scale_fill_continuous('Individuals',low='white',high='black')
g<-g+xlab('Genomic mutation rate')+ylab('Relative fitness')
g<-g+coord_cartesian(xlim=c(0,1.56),ylim=c(0,1))
g<-g+theme_bw(28)+pub_theme+opts(legend.title(theme_text(angle=180))
print(g)
g<-qplot(U,fitness,data=ml2_dis,fill=num_ind,width=width,geom='tile')
g<-g+scale_fill_continuous('Individuals',low='white',high='black')
g<-g+xlab('Genomic mutation rate')+ylab('Relative fitness')
g<-g+coord_cartesian(xlim=c(0,1.56),ylim=c(0,1))
g<-g+theme_bw(28)+pub_theme+opts(legend.title=theme_text(angle=180))
print(g)
g<-qplot(U,fitness,data=ml2_dis,fill=num_ind,width=width,geom='tile')
g<-g+scale_fill_continuous('Individuals',low='white',high='black')
g<-g+xlab('Genomic mutation rate')+ylab('Relative fitness')
g<-g+coord_cartesian(xlim=c(0,1.56),ylim=c(0,1))
g<-g+opts(legend.title=theme_text(angle=90))
g<-g+theme_bw(28)+pub_theme
print(g)
mlhrd_dis<-read.csv('mlhrd_fit_dis.csv')
g<-qplot(U,fitness,data=ml2_dis,fill=num_ind,width=width,geom='tile')
g<-g+scale_fill_continuous('Individuals',low='white',high='black')
g<-g+xlab('Genomic mutation rate')+ylab('Relative fitness')
g<-g+coord_cartesian(xlim=c(0,1.56),ylim=c(0,1))
#g<-g+opts(legend.title=theme_text(angle=90))
g<-g+theme_bw(28)+pub_theme
print(g)
mlhrd_dis<-read.csv('mlhrd_fit_dis.csv')
g<-qplot(U,fitness,data=mlhrd_dis,fill=num_ind,width=width,geom='tile')
g<-g+scale_fill_continuous('Individuals',low='white',high='black')
g<-g+xlab('Genomic mutation rate')+ylab('Relative fitness')
g<-g+coord_cartesian(xlim=c(0,1.56),ylim=c(0,1))
#g<-g+opts(legend.title=theme_text(angle=90))
g<-g+theme_bw(28)+pub_theme
print(g)
l2u
lhu
h1u
mlhrd_dis<-read.csv('mlhrd_fit_dis.csv')
g<-qplot(U,fitness,data=mlhrd_dis,fill=num_ind,width=width,geom='tile')
g<-g+scale_fill_continuous('Individuals',low='white',high='black')
g<-g+xlab('Genomic mutation rate')+ylab('Relative fitness')
#g<-g+coord_cartesian(xlim=c(0,1.56),ylim=c(0,1))
#g<-g+opts(legend.title=theme_text(angle=90))
g<-g+theme_bw(28)+pub_theme
print(g)
h1u
mlhrd_dis<-read.csv('mlhrd_fit_dis.csv')
g<-qplot(U,fitness,data=mlhrd_dis,fill=num_ind,width=width,geom='tile')
g<-g+scale_fill_continuous('Individuals',low='white',high='black')
g<-g+xlab('Genomic mutation rate')+ylab('Relative fitness')
g<-g+coord_cartesian(xlim=c(0,1.56),ylim=c(0,1))
#g<-g+opts(legend.title=theme_text(angle=90))
g<-g+theme_bw(28)+pub_theme
print(g)
mlhrd_dis<-read.csv('mlhrd_fit_dis.csv')
g<-qplot(U,fitness,data=mlhrd_dis,fill=num_ind,width=width,geom='tile')
g<-g+scale_fill_continuous('Individuals',low='white',high='black')
g<-g+xlab('Genomic mutation rate')+ylab('Relative fitness')
g<-g+coord_cartesian(xlim=c(0,1.554),ylim=c(0,1))
#g<-g+opts(legend.title=theme_text(angle=90))
g<-g+theme_bw(28)+pub_theme
print(g)
mlhrd_dis<-read.csv('mlhrd_fit_dis.csv')
g<-qplot(U,fitness,data=mlhrd_dis,fill=num_ind,width=width,geom='tile')
g<-g+scale_fill_continuous('Individuals',low='white',high='black')
g<-g+xlab('Genomic mutation rate')+ylab('Relative fitness')
g<-g+coord_cartesian(xlim=c(0,1.554),ylim=c(0,1))
#g<-g+opts(legend.title=theme_text(angle=90))
g<-g+theme_bw(28)+pub_theme
print(g)
max(mlhrd_dis$width)
max(mlhrd_dis$U)
mlhrd_dis<-read.csv('mlhrd_fit_dis.csv')
g<-qplot(U,fitness,data=mlhrd_dis,fill=num_ind,width=width,geom='tile')
g<-g+scale_fill_continuous('Individuals',low='white',high='black')
g<-g+xlab('Genomic mutation rate')+ylab('Relative fitness')
print(g)
g<-qplot(U,fitness,data=mlhrd_dis,fill=num_ind,width=width,geom='tile')
g<-g+scale_fill_continuous('Individuals',low='white',high='black')
g<-g+xlab('Genomic mutation rate')+ylab('Relative fitness')
g<-g+coord_cartesian(xlim=c(0,1.936),ylim=c(0,1))
#g<-g+opts(legend.title=theme_text(angle=90))
g<-g+theme_bw(28)+pub_theme
print(g)
l2u
ml2_dis<-read.csv('ml2_fit_dis.csv')
g<-qplot(U,fitness,data=ml2_dis,fill=num_ind,width=width,geom='tile')
g<-g+scale_fill_continuous('Individuals',low='white',high='black')
g<-g+xlab('Genomic mutation rate')+ylab('Relative fitness')
g<-g+coord_cartesian(xlim=c(0,2.562),ylim=c(0,1))
#g<-g+opts(legend.title=theme_text(angle=90))
g<-g+theme_bw(28)+pub_theme
print(g)
ml2_dis<-read.csv('ml2_fit_dis.csv')
g<-qplot(U,fitness,data=ml2_dis,fill=num_ind,width=width,geom='tile')
g<-g+scale_fill_continuous('Individuals',low='white',high='black')
g<-g+xlab('Genomic mutation rate')+ylab('Relative fitness')
g<-g+coord_cartesian(xlim=c(0,2.562),ylim=c(0,1))
#g<-g+opts(legend.title=theme_text(angle=90))
g<-g+theme_bw(28)+pub_theme
postscript('ml2_fit_dis.ps',onefile=FALSE,horizontal=FALSE,paper="special",width=8,height=7,pointsize=16)
print(g)
dev.off()
mlhrd_dis<-read.csv('mlhrd_fit_dis.csv')
g<-qplot(U,fitness,data=mlhrd_dis,fill=num_ind,width=width,geom='tile')
g<-g+scale_fill_continuous('Individuals',low='white',high='black')
g<-g+xlab('Genomic mutation rate')+ylab('Relative fitness')
g<-g+coord_cartesian(xlim=c(0,1.936),ylim=c(0,1))
#g<-g+opts(legend.title=theme_text(angle=90))
g<-g+theme_bw(28)+pub_theme
postscript('mlhrd_fit_dis.ps',onefile=FALSE,horizontal=FALSE,paper="special",width=8,height=7,pointsize=16)
print(g)
dev.off()
mlhrd_dis<-read.csv('mlhrd_fit_dis.csv')
g<-qplot(U,fitness,data=mlhrd_dis,fill=num_ind,width=width,geom='tile')
g<-g+scale_fill_continuous('Individuals',low='white',high='black')
g<-g+xlab('Genomic mutation rate')+ylab('Relative fitness')
g<-g+coord_cartesian(xlim=c(0,2),ylim=c(0,1))
#g<-g+opts(legend.title=theme_text(angle=90))
g<-g+theme_bw(28)+pub_theme
postscript('mlhrd_fit_dis.ps',onefile=FALSE,horizontal=FALSE,paper="special",width=8,height=7,pointsize=16)
print(g)
dev.off()
mlhrd_dis<-read.csv('mlhrd_fit_dis.csv')
g<-qplot(U,fitness,data=mlhrd_dis,fill=num_ind,width=width,geom='tile')
g<-g+scale_fill_continuous('Individuals',low='white',high='black')
g<-g+xlab('Genomic mutation rate')+ylab('Relative fitness')
g<-g+coord_cartesian(xlim=c(0,1.936),ylim=c(0,1))
#g<-g+opts(legend.title=theme_text(angle=90))
g<-g+theme_bw(28)+pub_theme
postscript('mlhrd_fit_dis.ps',onefile=FALSE,horizontal=FALSE,paper="special",width=8,height=7,pointsize=16)
print(g)
dev.off()
q()
