# Modify attributes of plot after beeing created [duplicate]

I have a complex plot of which’s calculation took quite a long time. Is it possible afterwards to modify certain attributes of the plot without the necessity to calculate it again?

Example:

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


Question: How can I access and modify directly p to e.g. set PlotLabel of p, or some other attributes?

• the following seems to work (to my surprise!) p[[2]]//FullForm displays the Plot options used for plotting; you could pick an option that is already present and replace it with something like eg p/.(DisplayFunction->Identity)->Sequence[DisplayFunction->Identity,PlotLabel->"just arrived!"]; if the option you want to change is already present then you can replace that directly eg p/.(PlotLabel->__)->(PlotLabel->"just arrived!") – user42582 Nov 23 '17 at 10:07
• @user42582: thanks ... also this works: p /. (DisplayFunction -> Identity) -> Sequence[PlotLabel -> "j‌​ust arrived!"] ... please put your comment as an answer. – mrz Nov 23 '17 at 10:36
• @mrz Show[p, PlotLabel -> "whatever"] – Kuba Nov 23 '17 at 10:36
• @mrz you wouldn't want to do that because you would effectively not include the DisplayFunction->Identity option which is not what you want to do – user42582 Nov 23 '17 at 11:01
• Comments are not for extended discussion; this conversation has been moved to chat. – Kuba Nov 23 '17 at 12:03