This has been asked several times already, I am just too bored to look for duplicates.
In general, for $x,y \in \Bbb C$, one defines $x^y$ as $\Bbb e ^{y \ln x}$. Of course, one has to tell what the natural logarithm means for complex numbers. The usual procedure is to eliminate a half-line from the complex plane, in order to be able to unambigously define a "principal argument". Fine, but what half-line to choose? Most people choose to eliminate the subset $\{ z \in \Bbb C \mid \Re z \le 0 \}$, which means that with this convention one may not speak about $\ln y$ for real $y \le 0$. In particular, $(-1)^{-x}$ would no longer make sense under this convention.
Of course, other half-lines may be eliminated, in which case one might be able to define $(-1)^{-x}$ (which would be a complex number even for $x \in \Bbb R$!), but this approach is less common. Assuming that you choose to go this way, you could remove the half-line $\{ z \in \Bbb C \mid \Re z \ge 0 \}$ (this being just one possibility among many others), define the principal argument to be $\arg z$ to be the angle formed by the segment $0z$ with the $x$-axis (measured from the $x$-axis counter-clockwisely), and then define $\ln z = \ln |z| + \Bbb i \arg z$. It becomes clear that, with this convention, $\ln (-1) = \ln 1 + \Bbb i \pi = \Bbb i \pi$, so that
$$(-1)^{-x} = \Bbb e^{-x \ln (-1)} = \Bbb e^{\pi \Bbb i (-x)} = \cos (-\pi x) + \Bbb i \sin (-\pi x) = \cos (\pi x) - \Bbb i \sin (\pi x)$$
so $\Re (-1)^{-x} = \cos (\pi x), \quad \Im (-1)^x = -\sin (\pi x)$, which explains the shape of the curves in your plot.
(I have used Euler's formula $\Bbb e ^{\Bbb i x} = \cos x + \Bbb i \sin x$ and the fact that $\cos (-x) = \cos x$ and $\sin (-x) = \sin x$.)