I have the following plot, generated using this code
plt <- ggplot(d2, aes_string(x=names(same_df)[1],y= "value")) +
geom_point(aes(color = variable), size = 1)+ theme_bw()+
theme(legend.text=element_text(size=14), legend.title=element_text(size=14))+
theme(axis.text=element_text(size=20)) +
theme(axis.title=element_text(size=20,face="bold")) + scale_color_discrete(name = "title", labels = c("1", "2", "3", "4","5","6","7","8","9")) + labs(x = "x", y = "y")+ guides(colour = guide_legend(override.aes = list(size=4),ncol=2,title.hjust=0.5))+theme(plot.margin=unit(c(0,0,0,0),"mm"))
However I need SI prefix notation for the numbers in the y-axis, to get that I did the following steps,
library("sos")
To use the findFn in sitools package
findFn("{SI prefix}")
Then I use the f2si in the labels to convert a floating point number number to number with a SI prefix
plt2 <- plt + scale_y_continuous(labels=f2si)
The resulting plot looks like this,
While the f2si accurately changed the y axis for -1e^-0.8 to -10 n, it does not accurately display the value for 0 and 1e^-0.8 which would be 0 and 10 n respectively. Could someone please suggest what should be corrected here so that the numbers are displayed as they should be throughout.
Thanks.