Home » Blog
date 18.Jul.2023

■ plot excel columns against each other

I remember it used to be easy to create plots out of excel column data. If you had 2 columns selected, excel "AI" would understand that the first column would be the X-axis (labels) and the other column would be the actuall data to plot. The first row usually is the label of each piece of information, e.g. try these yearly sales data:
year	income
2016	8914
2017	3512
2018	5643
...	...

I don't know when exactly excel started to get weird with "scientific" plots, but my MS Excel 2010 (spare the laggard jokes please :) would automatically plot the 2 columns side by side, as if they were unrelated pieces of information, instead of using the year column as the ordinate x-axis, e.g.

2 ways to view charts

This affects both bar charts and line charts. A quick google search (even chat-GPT/bing chat) didn't return any obvious and easy way to declare the first column as the X-axis. I saw various laborious methods involving editing the chart data manually, surely there must be an easier way to do what we want?

Indeed there is, first create a scatter plot that automatically uses the first column as X-axis and the second as Y-axis (values). Then you change the plot type to say, bar chart, and the axes will remain put. Here's the demo video:

You can always bet on zabkat to spare you and your CPU of all unnecessary effort, be it for file management or otherwise. You are welcome! <g>

Post a comment on this topic »

©2002-2023 ZABKAT LTD, all rights reserved | Privacy policy | Sitemap