I need to write a word on a figure, which I have saved as fig.pdf.

1) I import the pdf file to mathematica:

a = Import["fig.pdf"][[1]]; 

2) Following the example given in "Help":

Graphics[{Circle[], Inset[x^2 + y^2 == 1, {0, 0}]}]

I do

Graphics[{a, Inset[x^2 + y^2 == 1, {0, 0}]}]

But this does not work. How can I write a word in an imported pdf, in a position a I wish?

Thank you.


1 Answer 1


You have problem because your variable a is already a graphics object. This works for me:

file = Export["fig.pdf", Plot[Sin[x], {x, 0, 2 π}]]
g = First[Import[file]]
Graphics[{g[[1]], Inset[x^2 + y^2 == 1, {200, 200}]}]

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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