Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm plotting some things for which scale matters. Range of X values is naturally not the same as the range of Y values. For example, X goes from 0-100, Y from 10-17.

Is there a way to make a chart/graph ... X-Y plot, so that X and Y have the same scale on the chart. 10 units in X direction takes the same number of pixels as 10 units in Y direction.

Apart from scretching the plot and adjusting it manually (which is a pain)...

share|improve this question
add comment

1 Answer

There's a way to do it that isn't pretty, you'll have to add in a phantom series with two data points.

See http://www.eng-tips.com/viewthread.cfm?qid=83015


You can set XY scales proportionally without macros, but using additional chart series consisting just of two data points to plot a diagonal line with equal tangents. The tangent length shall be dx=max(x)-min(x) or dy=max(y)-min(y) whichever is larger. Based on tangent length Excel will automatically set equal (or almost equal) limits to X and Y axes.

Step 1: Plot area shall be square (you can do it manually or in VBA (see IRstuff postage) ActiveChart.PlotArea.Select Selection.Width = 400 Selection.Height = 400

Step 2: Reserve 2x2 range for new series. Using IF function enter formulas for xo and yo

if dx >= dy

xo(1)=min(x) yo(1)=(max(y)+min(y)-dx)/2

xo(2)=max(x) yo(2)=(max(y)+min(y)+dx)/2

if dx < dy

xo(1)=(max(x)+min(x)-dy)/2 yo(1)=min(y)

xo(2)=(max(x)+min(x)+dy)/2 yo(2)=max(y)

Step 3: Add new series to the chart. Set line and marker width to none to make chart invisible.

The user providing the answer has a link to the SectProp software.

share|improve this answer
    
Uhmm, okey (?) ... how does that change anything? Changing the gridlines doesn't affect the scale whatsoever. –  ldigas Oct 23 '11 at 20:16
    
@ldigas If you set the minimum and maximum for each axis to be fixed at the same values, the scale will be the same. min and max affect more than just the gridlines. So in your above case, either setting Xmin = 0, Xmax = 17 and leaving Y the same, or if you'd prefer, leaving Xmin = 0, Xmax = 100, and changing Ymin = 0, Ymax = 100. I don't think there's a way to autodetect this, you'll have to do it by hand. –  jonsca Oct 23 '11 at 22:54
    
No it won't. The range of the graph will be the same. See here imageshack.us/photo/my-images/217/explanationg.jpg If I take a graph and "stretch" it I'm modifying the scale of the axis in which direction I'm stretching it. –  ldigas Oct 23 '11 at 23:04
    
liveyachting.com/wp-content/uploads/2010/01/… See the upper right corner, the part where it says Scale: 1:75. It is the same in both directions. That means that however you measure, 1 cm on paper (in this case extended A1) equals 75cm in nature. –  ldigas Oct 23 '11 at 23:09
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.