Sign up ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I have a really complex function that takes a few hours to plot as a function of a parameter. Few days later I realised that I named the axes wrong. Is there an easy way to edit the AxesLabels without running the plot again? (it takes too long!!) I tried Show[%, AxesLabel-> {newname, newname2}] but it doesn't change anything...

share|improve this question

3 Answers 3

Very straightforward:

plot = Plot[Sin[x], {x, 0, 2 Pi}];

plot /. (AxesLabel -> _) -> (AxesLabel -> {"x", "y"})
share|improve this answer
Ah, proofs I still have a lot to learn ;) Thanks man! – cherzieandkressy Apr 28 '13 at 20:47

You can copy and paste your graphic, add /. {"oldName1" -> "newName1", "oldName2" -> "newName2"} after it, and evaluate :

enter image description here

share|improve this answer

Is this what you want?

g = Plot[Sin[x], {x, 0, 2 \[Pi]}]
Graphics[Line@Cases[g, Line[x__] :> x, \[Infinity]], PlotLabel -> "New labels", Options[g]]
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.