Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I have an output graph on a saved notebook that I cannot reproduce with my data (I messed up the instructions).

Can I take that graph, insert it in a new notebook and modify it? (I'm thinking about axes, labels, fonts, etc.)

share|improve this question
short answer: yes –  chris Sep 25 '12 at 10:13
!Mathematica graphics –  chris Sep 25 '12 at 10:14
Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2)[Read the FAQs] (tinyurl.com/cacvex2)! 3) When you see good Q&A, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. ALSO, remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign` –  Vitaliy Kaurov Sep 25 '12 at 13:23
add comment

1 Answer

up vote 4 down vote accepted

If you mean "graph" as in "plot of a function", then assign your graph to a variable and then extract/modify its properties. Imagine you have just this:

enter image description here

Then this is an example of "extract/modify its properties":

Show[Graphics[{Red, Thick, pl[[1, 3, 2]]}], Axes -> False, Frame -> True, 
BaseStyle -> {12, FontFamily -> "Times", Italic}, AspectRatio -> .6]

enter image description here

If on other hand you have "graph" as a network, then there are many options to go around, because Graph returns an object where all information about Graph is preserved. This is one way to do it:

enter image description here

  AbsoluteOptions[gr, VertexCoordinates], GraphStyle -> "ThickEdge"], 
 Axes -> False, Frame -> True, FrameTicks -> True, 
 BaseStyle -> {12, FontFamily -> "Times", Italic}, AspectRatio -> 1]

enter image description here

share|improve this answer
for clarity, once youve closed the nodebook and quit the kernel, to get the plot back as an object you can modify you need to copy the graphic (right click/copy) and past into an input cell, setting equal to a variable. –  george2079 Sep 25 '12 at 14:55
Just a note: such a solution has been possible only since the day (with Version 6??) that graphics output ceased being merely a side-effect of code and became instead an actual Mathematica object capable of being operated upon like any other object. –  murray Sep 25 '12 at 20:42
Yup, I didnt know this till looking at this question.. I guess it would be worthwhile to read those release notes!! –  george2079 Sep 25 '12 at 21:22
add comment

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.