I'm plotting like crazy to finish up my MS. Adding explanatory text is easy enough using mtext
or text
, and adding expressions is simple too however when I need to add them both I keep having problems.
plot(1:598,xaxt='n',yaxt='n', type="l")
text(475,200,expression(paste(
" RMSE=Root Mean Squared Error
MAD=Mean Absolute Deviance
Average RMSE=5.78","",m^3/h,"","
","","Average MAD=4.47", "",m^3/h, sep = "")), cex=1)
My text and expressions are working but why is there are large gap after RMSE=5.78, and why doesn't the text space down after the first expression? It seems I don't understand how expression
and paste
are working together. Am I forced to specify separate x,y for each line?
Bonus question!! I've been looking at ggplot2 and it produces some nice looking graphs that are rendered smooth, but many of the common plotting arguments are different. I honestly found it easier to learn Matlab. I've been exporting my plots with cairo
which allows me to make some high res and fairly professional quality graphs. I can pretty much do whatever I need to with the regular plotting functions. My question is does ggplot really make plotting that much faster if you are trying to make high quality publishable figures, or is its strength making quick figures looks nice? To me it seems ggplot becomes just as complicated when you want to specify a lot of details.