I used R to get different plots. I saved them as pdf. I went to my tex. file and I used \includegraphics command. The plot came but it does not have labels on, that is, x-labels, y-labels and title-labels. Please advice.


Whithout a minimal working example (see I've just been asked to write a minimal example, what is that?) is hard to guess the problem, but a way to overcome this problem and simplify your work is use Sweave (or knitr). Briefly:

1) First, you can make a file.Rnw like this:

Some \LaTeX{} text.
plot(uptake~conc, xlab="x label", ylab="y label", main="The main label")

2) Then, compile it with R to obtain a file.tex:

R CMD Sweave file.Rnw

3) Finally, Compile your file.tex as usual to obtain file.pdf.

For simple files as the above MWE, or a working preview, where just one pdflatex compilation is enough, you can omit the step 3 and use the--pdf option in 2:

R CMD Sweave --pdf file.Rnw

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.