title: MatLab: Scatter Plots and Raster Plots
body: <p>Scatter Plots in MatLab.  I can create a scatter plot with x and y arrays being the same size as follows:</p>
  
  <pre><code>function RasterTest()
  
      clear all % clear memory
      clc; % clear command window
      close all; % close any figure windows that are open
  
      x=[1 2 3]; % x positions of the charges
      y=[4 8 2]; % y positions of the charges
  
      scatter(x,y,'filled')
      axis square
  
  end
  </code></pre>
  
  <p>However, what if I want every x to have multiple y values?  I.e. the array sizes are different.  I think this is actually called a raster plot but MatLab doesn't seem to have something to do this?</p>
  
  <p>Any help would be great :).</p>