# PlusMinus definition unexpectedly affects plotting

In version 10.1 I found a strange Plot behavior I did not anticipate. It seems that various heads including PlusMinus are treated as wrappers and stripped by Plot in a way that is not safe. This means that definitions that do not appear in the plot expression can radically and errantly affect its output:

ClearAll[PlusMinus]
Plot[x^2, {x, -1, 1}]


PlusMinus = Power;
Plot[x^2, {x, -1, 1}]


Surely this is a bug? What versions are affected? What is the easiest way to patch this in version 10.1?

• v9.0.1 is not affected: i.stack.imgur.com/IpBYU.png. Persisting through v12.1. (Tested on Wolfram cloud. ) – xzczd May 22 '20 at 10:50
• I think this may be the function that needs leak-proofing: ChartingParserDumpplotStripWrappers – Mr.Wizard May 22 '20 at 10:58
• Bug also present in v11.2. – Hans Olo May 22 '20 at 11:06
• Further check shows ChartingParserDump context doesn't seem to exist in v9.0.1. – xzczd May 22 '20 at 11:09

It appears that PlusMinus is the only wrapper that is not Protected:
ChartingPlotParser; (* preload *)
Select[ChartingParserDump$pAllWrappers, FreeQ[Protected]@*Attributes]  {PlusMinus}  We can remove it from that list to correct this bug, but perhaps induce others: ChartingPlotParser; (* preload; do not remove! *) With[{ov := OwnValues @ ChartingParserDump$pAllWrappers},