I presume that the “similarity” you’re referring to is the presence in both graphs of some sort of “curves” (or at least narrow regions) where the density of points is noticeably higher than the local average density (but not “fully filled in”).
Let’s look a little closer at these curves. The Ulam Spiral and its relatives fill the plane with a spiral starting at the origin. So curves heading outward from the origin intercept the spiral at distances (measured along the spiral) growing roughly quadratically. This means that the eye-catching curves, the most noticeable characteristics of these spirals, will be quadratic curves n[sup]2[/sup]+an+b having large prime densities. (In the usual square-cornered Ulam Spiral, the most obvious curves are 45° diagonal lines.) These lines are obviously only one pixel wide (the neighboring points all being even), and as far as I know there’s no real theoretical understanding of them.
Now for the Pythagorean triples, ignoring the obvious radial lines coming from small triples, there is again a sort of noisy banded structure of curves: for example, there’s a prominent one looking like a left-opening parabola with vertex near (1450,0) and curving up and leftward to about (0,2900). One obvious difference is that these “curves” are not just one pixel wide; this probably already means that there’s no deep connection between the two.
What can we say about these curves? Remember the parametrization of the Pythagorean triples: any Pythagorean triple a[sup]2[/sup]+b[sup]2[/sup]=c[sup]2[/sup] can be written as
(with m>n>0 integers, and possibly with a and b reversed). If we fix m and let n vary, the locus of (a,b) is a parabola
4m[sup]2[/sup]a = 4m[sup]4[/sup]-b[sup]2[/sup];
these parabolas follow the curves that I think you’re referring to.
Now of course once we fix m, we can choose n=1,…,m-1 to get exactly m-1 points along this curve. So in fact if we restrict ourselves to a single such parabolic curve, all of these curves should have the same local density. So we notice some “curves” as denser than others only because the curves are clumped together in places.
How does this happen? Well, of course if (a,b,c) is a Pythagorean triple then so is (ka,kb,kc) for any integer k>0. So if we scale the graph of the Pythagorean points (a,b) by any positive integer, the result is a subset of the original graph. The “clumping” occurs when there are several such scalings that give curves in nearly the same place.
For a small example, one of the curves starts near (365,0) and heads up and left to somewhere close to (0,710). Note that 361=19[sup]2[/sup], 363=11[sup]2[/sup]3, and 360=6[sup]2[/sup]10. So there are several scaled curves that land pretty close to the curve for m=19; instead of 18=19-1 points along the curve, these three scaled curves give (19-1)+(11-1)+(6-1)=33, about twice as many as “expected.” In fact there are even more: 364.5=27[sup]2[/sup]/2, so if we scaled by 1/2 then all 13 of the (even,even) points along the curve for m=27 are also close to this curve, so this gives us 46 points “close to” this parabola, enough more than the local average that it stands out to the eye. (The prominent curve I mentioned earlier (starting near (1450,0) and curving up and left) is just scaled by a factor of 4 from this one. So it inherits all of these curves, probably along with some others.)
That is, the “curves” in this graph occur whenever there’s a cluster of large square factors among a small set of contiguous integers (and half-integers). These are vaguely related to solutions of Pell equations a[sup]2[/sup]-kb[sup]2[/sup]=c (with k and c small); there may be some nicer way of characterizing them though.