i get the same plot for both, and unsure about your special function i don't have
i will say: use Module to protect your variables from Global`
for instance, if Graphicsx exists and you assume Global
x doesn't refer to it: you might be wrong. in the case of "x" your safe.
however, if you've loaded packages or been trashing Global`, it may well trick you, tricks everyone at times
use Module[]
Context[]
see what your current context in
f[x_]=x=2;
f[x_]=(Unprotect[x];x=2);
make sure your function doesn't try to access in-accessible variables as well, for example if your special function changes x but x is it's parameter, it changes $x???, not Global`x, unless you Unprotect x. i'm unsure how savvy you are about namespace so i mentioned it
?Global`*
see list of all variables in Global` , use ?? to see definitions
Attachments: