Firstly, the formula traces a spiral. If you plot every point, that is. You only plot a point if it's a prime, but it's still always going to trace a spiral!
Still, this only-plotting-primes business leads to new, unexpected patterns emerging. Yet, if you think about it, that's not altogether surprising really. Patterns emerge not so much in where the primes are, as where the primes aren't. Once you go beyond two, anything divisible by two can't be a prime anymore. Same with three. Same for all numbers, because that's what prime means. As a result, you get a pattern. It just so happens that this is what that pattern looks like when you plot it on a spiral rather than a straight line, or in a grid like the OP.
The grid has a similar effect, but the pattern forms vertical lines depending on how many of the prime factors within the set divide evenly by the modulo divisor chosen. Or the divisor +/- 1, which gives rise to diagonals (try adjusting the number up/down by 1 to see this effect).