title: scatterplot visualize the same points in matlab
body: <p>I have the following problem: I need to build the scatterplot of the data. Everything nice, but there is some duplicate data there:</p>
  
  <pre><code>x = [11, 10, 3, 8, 2, 6, 2, 3, 3, 2, 3, 2, 3, 2, 2, 2, 3, 3, 2, 2];
  y = [29, 14, 28, 19, 25, 21, 27, 15, 24, 23, 23, 18, 0, 26, 11, 27, 23, 30, 30, 25];
  </code></pre>
  
  <p>One can see that there are two elements with <code>(2, 25);</code> <code>(2,27);</code> <code>(3,24);</code>
  So if to build this data with a regular <code>scatter(x,y)</code> I am loosing this information:
  <img src="https://i.stack.imgur.com/jInMm.png" alt="enter image description here"></p>
  
  <p>The way out of this I have found is to use undocumented <code>'jitter'</code> parameter</p>
  
  <pre><code>scatter(x,y, 'jitter','on', 'jitterAmount', 0.06);
  </code></pre>
  
  <p>But I do not like the outlook:
  <img src="https://i.stack.imgur.com/WtqCa.png" alt="enter image description here"></p>
  
  <p>What I was trying to achieve is this:</p>
  
  <p><img src="https://i.stack.imgur.com/0ue6s.png" alt="enter image description here"></p>
  
  <p>Where the number of duplicates is next to the point (if the number is more than 1), or may be inside the point.</p>
  
  <p>Any idea how to achieve this?</p>