Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Scatterplot jitters - bug? (v12/Win used)


From   "Allan Reese (Cefas)" <allan.reese@cefas.co.uk>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: Scatterplot jitters - bug? (v12/Win used)
Date   Mon, 24 Jun 2013 13:03:33 +0000

Here's an irritating "feature" that I would term a bug, in that the results are not as per documentation and are counter-intuitive.  It seems that coincident points at the top-right limit of the plotted area are not jittered.  Here's a little, real, dataset and two examples to compare. Point at (5 50.2) are not jittered in the first plot. 

. list y x, sep(0)

     +----------+
     | y      x |
     |----------|
  1. | 0   44.7 |
  2. | 0   44.7 |
  3. | 0   44.7 |
  4. | 0   39.9 |
  5. | 1   39.9 |
  6. | 0   39.9 |
  7. | 3   35.2 |
  8. | 5   35.2 |
  9. | 5   35.2 |
 10. | 5   50.2 |
 11. | 5   50.2 |
 12. | 3   50.2 |
     +----------+

. scatter y x, jitter(5)

. scatter y x, jitter(5) yscale( range(0 5.2))

Allan
 


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index