One way to reasonably efficiently detect them would be to 'bin' the data points, using overlapping boxes (Every data point is in 2 boxes. The size/number of the boxes is a function of the number of data points. Box size is chosen so that the number of data points in each box is small. Now, within the box, you can do distance from every point to every other point. Probably could get away with delta-x + delta-y as your distance function. If they are close, jitter them.
Every point has to be in multiple boxes so that you can avoid edge effects where point 6 is just barely in box 234. Off hand I think it could be done with two grids of boxes offset by half a box width. For quantized data, it may be better to use non-square boxes. E.g. if the X coordinate is discrete, then having boxes that are narrow in Y and wide in X to minimize both the box count and the number of points per box. The jitter function has to move points away from each other, so it cannot be random. It is probably also necessary to check with a second pass to make sure you didn't jitter onto a new point. Respectfully, Sherwood of Sherwood's Forests Sherwood Botsford Sherwood's Forests -- http://Sherwoods-Forests.com 780-848-2548 50042 Range Rd 31 Warburg, Alberta T0C 2T0 On 2 July 2013 08:58, Jeremy Sanders <[email protected]> wrote: > Hi - > > It's possible to add some support, but it's not trivial. You'd need an > efficient algorithm to find points that are very nearby in space and jitter > them (maybe a k-d tree would work - you definitely don't want to check > every point against every other point). > > It's a bit unclear to me by how much points should be jittered - maybe > just using the size of the marker would be ok. Would they be randomly > jittered, or would you like some sort of regular pattern (side-by-side, in > a grid, in a circle...)? You'd also need to choose how close a point should > be to be jittered (perhaps some fraction of the marker size). > > Jeremy > > On 07/02/2013 01:10 PM, M. Ignacio Monge wrote: > >> Thanks to all of you for your valuable suggestions. >> >> I've been using the random.numpy function as you suggested with quite >> good results. However, I've found that X values with different Y axis >> values are also jittered. I think that jittering should be applied >> only when two or more points share the same (or almost the same) Y axis >> value. I've attached a graph to show this problem. >> >> Do you think that jittering could be added as an option for future >> releases? It could be easy to control the disperssion with the >> normal(VAR,value), where "value" can control the jitter amount. Also, >> avoiding the random generation every time would be great. >> >> I hope these suggestion could be helpful. >> >> Dr. M. Ignacio Monge García >> Servicio de Cuidados Críticos y Urgencias >> Hospital SAS de Jerez >> C/ Circunvalación s/n. 11408 Jerez de la Frontera. Spain. >> Phone: 34 956032090 >> Fax: 34 956032091 >> >> >> 2013/6/23 Jeremy Sanders <[email protected] >> <mailto:jeremy@jeremysanders.**net <[email protected]>>> >> >> On 23/06/13 15:10, Sherwood Botsford wrote: >> >> If Veusz supported transparency, then by using a light color, >> datapoints >> that superimposed would appear darker than the other dots. If your >> symbols themselves are composed of dot arrays -- like a half >> tone screen >> -- then unless they were exactly the same values, the >> displacement would >> make overlapping symbols appear darker, much like overlaying two >> chunks >> of screen wire out of register. >> >> >> Veusz does support transparency, so this is another way of doing >> this. Transparency does not work very well in eps output, however, >> but it is fine when using pdf or svg. >> >> >> Jeremy >> >> >> >> ______________________________**___________________ >> Veusz-discuss mailing list >> [email protected] <mailto:[email protected]> >> >> https://mail.gna.org/listinfo/**__veusz-discuss<https://mail.gna.org/listinfo/__veusz-discuss> >> >> <https://mail.gna.org/**listinfo/veusz-discuss<https://mail.gna.org/listinfo/veusz-discuss> >> > >> >> >> >> >> ______________________________**_________________ >> Veusz-discuss mailing list >> [email protected] >> https://mail.gna.org/listinfo/**veusz-discuss<https://mail.gna.org/listinfo/veusz-discuss> >> >> > > ______________________________**_________________ > Veusz-discuss mailing list > [email protected] > https://mail.gna.org/listinfo/**veusz-discuss<https://mail.gna.org/listinfo/veusz-discuss> >
_______________________________________________ Veusz-discuss mailing list [email protected] https://mail.gna.org/listinfo/veusz-discuss
