I wonder if Jonnylane tried doing that himself! If you try to graph y= (-2)x by plotting values, you can calculate values for integer values of x but that won't necessarily tell you the true graph. In this case it certainly doesn't!
If you try to use a calculator to calculate values for fractional x, you are going to get more error messages.
In general, the function ax is only defined for positive a. (-2)x is going to be undefined for almost all x!
Can the function be graphed in the complex plane, or is it truly undefined for nonintegral x values?