Recently, I've been using matlab to run a particle aggregation simulation, and I use its plotting itnerface to represent each particle. Thus, I've put together some code which adjusts the size of a marker such that it is equivalent to the actual particle's diameter - in relation to the window's aspect ratio and such. Well, this works very well if I'm dealing with a square domain; see below.

As you can see, the markers are sized such that particles will settle out on topof each other perfectly. Here's the plotting code for that image:
%%Initial Plot at time t = 0 Along with Scaling in the Y-Direction
figure; h=scatter(Pos(1,:),Pos(2,:),6,jet(length(Pos(1,:))),'filled','MarkerEdgeColor','k','linewidth',1);
hold on
axis equal
axis ([0 dp 0 dp]*L*Scale)
currentunits = get(gca,'Units');
set(gca, 'Units', 'Points');
axpos = get(gca,'Position');
set(gca, 'Units', currentunits);
markerWidth = dp/diff(ylim)*axpos(4); % Calculate Marker width in points
set(h, 'SizeData', markerWidth^2)
Well, I added in periodic boundary conditions to my simulation, and this means that I can have 3X the window size shown above without much additional computation cost. So, I wanted to plot up a 3x1 domain (x is basically 3X longer than the y dimension of the domain). However, I'm having troubling sizing the particles appropriately such that they will be scaled properly in the y-direction yet also touch along the x-direction. I think I could do this using some kind of aspect ratio code, but I can't get it to work. Any ideas? Here's the code/result I came up with:
%Plot all of the data
figure;
h=scatter(Pos(1,:),Pos(2,:),6,jet(length(Pos(1,:))),'filled','MarkerEdgeColor','k','linewidth',1);
hold on
axis equal
axis ([0 3*dp 0 3*dp]*L*Scale)
currentunits = get(gca,'Units');
set(gca, 'Units', 'Points');
axpos = get(gca,'Position');
set(gca, 'Units', currentunits);
markerWidth = dp/diff(ylim)*axpos(4); % Calculate Marker width in points
set(h, 'SizeData', (markerWidth)^2)
axis ([0 3*dp 0 dp]*L*Scale)
It produces the following result,which is obviously incorrect :(...

