Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is it possible to get the equation of a graphic you have drawn using the drawing tools in Mathematica?
I want to do this because I drew something using the drawing tools, and now I want to programmely edit it to add a point at a specific coordinate.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

It is possible to get the code that generates the graphics you added using the drawing tools.

For example, here's a quadratic where I've used the drawing tools to add in arrows to the x-intercepts:

Plot[x^2 - 4, {x, -3, 3}]


After the graphics type // InputForm to see the code that makes the graphics. In this case I've also used /. Line[x_] -> Line to suppress all of the points that make up the plot: enter image description here

The highlighted code is that which was added by the drawing tools. It can be simplified (e.g., remove the EdgeForm commands and replacing the Inset Cell with just a plain Text command) when you add it back to your original Plot, which can be done with an Epilog (or a Prolog) or by using Show.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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