Sunday, December 4, 2011

Plot as values in Excel, and not labels?

I have data that has a coordinate in 1 column and a binary variable in the other





1200,0


1245,0


1246,0


1268,1


1272,1


1300,0


....





The first column values are not spaced at uniform intervals (as you can see from the above).





I wanted to plot these values, but Excel interprets the first column as labels and thus shows the y values (0 or 1) at equidistant points along the X axis. Is there any way I can overcome this problem?|||Excel allows quite a bit of freedom on how to chart things.





I usually just fool around with right clicking to get options.





It's not something that I do often enough to help you right now. I also don't have Excel here on my home machine!|||I plotted it and didn't get any problems. The x-values spaced out as they should be. Unless I completely misunderstood your question...


Put in both sets in 2 different columns. So Column A should have (going vertically downward): 1200,1245,1246,1268,1272,1300


and Column B should have (going vertically downward): 0,0,0,1,1,0





Then highlight both columns and then click 'Insert', then 'Chart'. Choose 'XY Scatter' and make sure that the first template is selected (the one with just the points only). Click Next. Then make sure that the 'Series in Columns' button is selected. Then just click Next, Next, Finish. You should see it working as it is supposed to.

No comments:

Post a Comment