I haven't seen this done before so I don't know if there's a standard way. The idea seems to be to take some points which are real data, create a random variable for each point with the points' position as the mean, then choose some number of points from each distribution to create some new points clustered around the original data. Some examples online seem to use uniform distributions and Poisson distributions or mixtures of these (uniform for the x-variable and Poisson for the y). If my take on this is correct, you can use scipy.stats to do this - an example is in the attached file which creates Gaussian distributions for each of the x and y coordinates then creates an equal number of new points for each of the seed points. The online examples I saw seem to choose random numbers of new points for each seed point. I didn't bother trying to cover all the possibilities. Hopefully this is helpful,
Gary R. On Thu, Feb 24, 2011 at 3:04 PM, Uri Laserson <laser...@mit.edu> wrote: > Hi all, > I am interested in jittering points in a plot. I searched the forum, but I > am amazed at the dearth of results on the topic. I am referring to > something like this: > http://goo.gl/Db47s > or > http://goo.gl/BjIZt > > Is there a standard way people do this with MPL? > Thanks! > Uri > ................................................................................... > Uri Laserson > Graduate Student, Biomedical Engineering > Harvard-MIT Division of Health Sciences and Technology > M +1 917 742 8019 > laser...@mit.edu
jitter.py
Description: Binary data
------------------------------------------------------------------------------ Free Software Download: Index, Search & Analyze Logs and other IT data in Real-Time with Splunk. Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users