From: Ethan A M. <me...@uw...> - 2020-10-15 16:46:35
|
On Thursday, 15 October 2020 08:02:27 PDT Allin Cottrell wrote: > Maybe I'm missing something, but isn't the documentation for > "jitter" backwards with respect to the swarm/square choice? > > The text reads thus: "The default jittering operation displaces > points only along x. This produces a distinctive pattern sometimes > called a "bee swarm plot". The optional keyword square adjusts the y > coordinate of displaced points in addition to their x coordinate so > that the points lie in distinct layers..." The text is correct as written. Perhaps the attached figure, combining two plots from jitter.dem, will clarify. Left panel: original data, randomly distributed on y, all x values the same Center panel: "beeswarm" result from displacing points along x if they would otherwise overlap. Points are still randomly distributed on y. Right panel: "square" plot uses the x displacements that would generate a beeswarm plot, and adds an y displacement that is effectively a floor(y) operation where the unit of the floor operation is the "overlap" parameter to jitter. > > In the demo and in my own usage it seems the default is in fact to > displace in both the x and y dimensions while "square" limits the > scatter to the x dimension. (Except that in some cases I'm not > getting any y displacement with either choice, but that's another > issue.) (figure attached) Ethan |