Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
up vote 2 down vote accepted

Very straightforward:

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

plot /. (AxesLabel -> _) -> (AxesLabel -> {"x", "y"})
share|improve this answer

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.