<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Peltier Tech Blog &#187; Chart Axes</title>
	<atom:link href="http://peltiertech.com/WordPress/category/chart-axes/feed/" rel="self" type="application/rss+xml" />
	<link>http://peltiertech.com/WordPress</link>
	<description>Peltier Tech Excel Charts and Programming Blog</description>
	<lastBuildDate>Thu, 09 Feb 2012 08:00:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Consistent Axis Scales Across Multiple Charts</title>
		<link>http://peltiertech.com/WordPress/consistent-axis-scales-across-multiple-charts/</link>
		<comments>http://peltiertech.com/WordPress/consistent-axis-scales-across-multiple-charts/#comments</comments>
		<pubDate>Thu, 09 Feb 2012 08:00:41 +0000</pubDate>
		<dc:creator>Jon Peltier</dc:creator>
				<category><![CDATA[Chart Axes]]></category>

		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=3369</guid>
		<description><![CDATA[In your dashboard, you may have several charts that show different but related data, and you&#8217;d like them to have the same axis scales to make comparisons from chart to chart possible. You could manually reset the axis scales whenever the data changes, or you could write some VBA code to keep them synchronized, but I&#8217;m [...]]]></description>
			<content:encoded><![CDATA[<p>In your dashboard, you may have several charts that show different but related data, and you&#8217;d like them to have the same axis scales to make comparisons from chart to chart possible. You could manually reset the axis scales whenever the data changes, or you could write some VBA code to keep them synchronized, but I&#8217;m going to show a simple and reliable way to handle this.</p>
<p>In the data below, there are two years of data for two different companies.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2012-02/ConsistentAxisData1.png" alt="Two-Year Data for Two Companies" width="261" height="120" /></p>
<p>Here is all of the data plotted in a single chart.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2012-02/ConsistentAxisChart1.png" alt="Two-Year Chart for Two Companies" width="384" height="203" /></p>
<p>Comparing data for a given company is most important, so I want to separate the data into separate charts for each company. But I still want to be able to compare the two companies. Here are my two charts.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2012-02/ConsistentAxisChart2.png" alt="Two-Year Charts for Each Company" width="512" height="203" /></p>
<p>Since Company 2&#8242;s data is higher, the maximum Y axis scale is larger. I could manually set the Y axis maximum for both charts to 120, but if the data changes, I&#8217;ll have to reset both charts again.</p>
<p>To determine what values to use, I add a small summary table near the main data table. Cells B10 and B11 compute the minimum and maximum of the data. Cells C10 and C11 show the values I will use. I want the minimum to be zero, so I simply type 0 in C10. I want the maximum to range with the data, so I enter =B11 into C11.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2012-02/ConsistentAxisData2.png" alt="Two-Year Data for Two Companies with Min and Max" width="261" height="205" /></p>
<p>Copy C9:C11 and use Paste Special to add this data to each chart as a new series, with data in columns and series names in the first row (don&#8217;t worry about X values). Notice the two charts have the same Y axis maximum, because they have the same maximum value from the added series.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2012-02/ConsistentAxisChart3.png" alt="Two-Year Charts for Each Company with Line for Equal Scales" width="512" height="203" /></p>
<p>It&#8217;s a simple matter to format the added series to use no line, and the charts will magically stay in synch.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2012-02/ConsistentAxisChart4.png" alt="Two-Year Charts for Each Company with Equal Scales" width="512" height="203" /></p>
<p>Te show the value of this approach instead of the manual approach, let&#8217;s add another year of data. Company 2 has really started to take off.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2012-02/ConsistentAxisData3.png" alt="Three-Year Data for Two Companies with Min and Max" width="355" height="205" /></p>
<p>Here is all the data in one messy chart.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2012-02/ConsistentAxisChart5.png" alt="Three-Year Chart for Two Companies" width="384" height="203" /></p>
<p>Here are the two original charts, with no attempt to synchronize axes.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2012-02/ConsistentAxisChart6.png" alt="Three-Year Charts for Each Company" width="512" height="203" /></p>
<p>Here is how the charts would look if the maximum had been manually fixed at 120. The 2012 data for Company 2 is cut off between Q3 and Q4.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2012-02/ConsistentAxisChart7.png" alt="Three-Year Charts for Each Company with Locked-In Equal Scales" width="512" height="203" /></p>
<p>However, if we make sure that our minimum and maximum formulas in B10 and B11 include the added data, the hidden series of both charts include the new maximum, so the axis scales are the same.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2012-02/ConsistentAxisChart8.png" alt="Three-Year Charts for Each Company with Flexible Equal Scales" width="512" height="203" /></p>
<p>This is a very easy technique, applicable to line, column, and area charts (in all cases, change the added series to a line chart series). It can also be used for both X and Y scales of an XY chart if we determine minimum and maximum values for X and Y.
<p>Peltier Technical Services, Inc., Copyright © 2011.<br /> <br /><span style="font: 80% Verdana,Tahoma,Arial,sans-serif;">Licensed under a <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/" rel="nofollow" rel="license" >Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>.<br /> <br />
<a href="http://peltiertech.com/Utility/" rel="nofollow"  title="PTS Chart Utilities: Waterfall, Cluster-Stack Column, Box and Whisker, Marimekko"><img src="http://peltiertech.com/Utility/pix/pts_banner_map.png" alt="PTS Chart Utilities: Waterfall, Box and Whisker, Cluster-Stack, Panel, Marimekko, Dot, Panel" border="0" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://peltiertech.com/WordPress/consistent-axis-scales-across-multiple-charts/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Select Meaningful Axis Scales</title>
		<link>http://peltiertech.com/WordPress/select-meaningful-axis-scales/</link>
		<comments>http://peltiertech.com/WordPress/select-meaningful-axis-scales/#comments</comments>
		<pubDate>Thu, 26 Jan 2012 08:00:37 +0000</pubDate>
		<dc:creator>Jon Peltier</dc:creator>
				<category><![CDATA[Chart Axes]]></category>

		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=3363</guid>
		<description><![CDATA[Last week, in You Have 1 New Notification On Klout!, I used social media metrics site Klout to illustrate how choice of axis scales can exaggerate or wash out the variation in a data set. Today I&#8217;ll pick on another social media metrics site, Topsy, to show how to pick meaningful axis tick spacing parameters. A [...]]]></description>
			<content:encoded><![CDATA[<p>Last week, in <a href="http://peltiertech.com/WordPress/you-have-1-new-notification-on-klout/"class="vt-p" title="You Have 1 New Notification On Klout!" >You Have 1 New Notification On Klout!</a>, I used social media metrics site <a href="http://klout.com/" rel="nofollow" class="vt-p" title="Klout" >Klout</a> to illustrate how choice of axis scales can exaggerate or wash out the variation in a data set. Today I&#8217;ll pick on another social media metrics site, <a href="http://topsy.com/" rel="nofollow" class="vt-p" title="Topsy" >Topsy</a>, to show how to pick meaningful axis tick spacing parameters.</p>
<p>A meaningful axis spacing allows a human viewer to make sense of the numbers in your chart.</p>
<h2>Original Topsy Charts</h2>
<p>Here is a chart of Twitter mentions of my blog over a one week period. Sorry the chart&#8217;s too wide, that&#8217;s as small as Topsy would make it and still have text large enough to read. You could right click on it and choose your browser&#8217;s equivalent of &#8220;Open Image In New Tab&#8221; to see it in all its glory.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2012-01/topsy_1wk.png" alt="Topsy graph for one week" /></p>
<p>Here&#8217;s the Topsy graph for two weeks.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2012-01/topsy_2wks.png" alt="Topsy graph for two weeks" /></p>
<p>Notice anything wrong with these charts? No, they do have the right number of points. But the vertical gridlines and the horizontal axis labels are not aligned with the points. In the 7-day chart (top), there are 8 labels between the axis min and max values. To accommodate this mismatch, some adjacent pairs of tick marks fall within the same day, so a couple of labels are repeated. In the 14-day chart (above), there are 9 labels between the axis min and max value; some days have no tick marks, so dates are left out, but not in a regular pattern.</p>
<p>This kind of unorthodox labeling causes the humans to have to think too much about the chart. Sometimes the choice of incredible charting options like this leads to lack of credibility of the whole chart.</p>
<h2>Human-Friendly Axis Spacing</h2>
<p>In a 7-day graph, what would be an intuitive axis tick spacing? Let&#8217;s try one day, since one week is too wide and one hour too narrow. In general, numbers that are 1, 2, or 5 times a power of ten make good values for axis tick spacing. 1, 20, 500, 0.01, and 0.5 are reasonable choices. If the scale is days, and a spacing of 1 or 2 days result in crowded labels, 7 days is a reasonable choice.</p>
<p>Here I&#8217;ve reconstructed Topsy&#8217;s 7-day chart with a 1-day axis tick spacing. It&#8217;s very natural, the ticks and gridlines are spaced the same as the data points, one day apart. Nobody has to use any excess gray matter to understand the time scale.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2012-01/topsy_1wkA.png" alt="One week graph with 'normal' 1-day axis spacing" /></p>
<p>Here is the 14-day Topsy data plotted with a 1-day axis spacing. It is as easy to read as me 7-day chart with 1-day spacing, which is to say, much easier than the Topsy Turvy spacing in the original chart.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2012-01/topsy_2wksA.png" alt="Two week graph with 'normal' 1-day axis spacing" /></p>
<p>This is really more axis labels than are needed, and some of them are forced to wrap so they don&#8217;t overlap. We can fix this by using a 2-day axis spacing. Also easy to read. I&#8217;ve helped the viewer by placing small minor tick marks at 1-day intervals.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2012-01/topsy_2wksA1.png" alt="Two week graph with 'normal' 2-day axis spacing" /></p>
<p>Intermediate gridlines work as well as intermediate tick marks.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2012-01/topsy_2wksA2.png" alt="Two week graph with 'normal' 2-day axis spacing and 1-day gridline spacing" /></p>
<h2>Topsy&#8217;s Axis Scale Parameters</h2>
<p>So what was Topsy thinking? Well, I can&#8217;t answer that, but I can estimate the axis tick positioning that they used.</p>
<p>Here is Topsy&#8217;s 7-day data. I&#8217;ve secretly replaced the regular time scale axis with an XY series that has spacing independent of the actual plotted points. Vertical error bars on the invisible points serve as my gridlines. The X values are based on formulas I can tweak in the worksheet, and I align the custom gridlines to closely resemble the original Topsy alignment. Jan 13 and Jan 15 both appear twice as in the original chart.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2012-01/topsy_1wkB.png" alt="One week graph with reconstructed Topsy spacing" /></p>
<p>To get the spacing right, the first gridline appears at 3:44 pm on January 12, which rounds up to the Jan 13 shown in the label. Each subsequent gridline is 16 hours and 40 minutes after the previous one. I think we can all agree that 16:40:00 is not as intuitive as 24:00:00.</p>
<p>I&#8217;ve reproduced the 14-day chart as well. The first gridline appears at 3:20 pm on January 5, which rounds up to Jan 6. Subsequent labels are 33 hours and 20 minutes apart. Again, not so intuitive.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2012-01/topsy_2wksB.png" alt="Two week graph with reconstructed Topsy spacing" /></p>
<p>I can&#8217;t really say where these strange tick spacing values came from, but I have a suspicion. 16:40 is 1000 minutes, and 33:20 is 2000 minutes. If the time dimension were plotted in minutes, the two charts have ranges of 8640 minutes (7 days) and 18720 minutes (14 days), so in fact 1000 and 2000 are human-friendly numbers. Of course, the data is spaced 1440 minutes apart, so the nice minute-based axis spacing is really irrelevant.</p>
<p>I suspect the charting mechanism has a nice algorithm to calculate the spacing based on the minimum and maximum data values, but it doesn&#8217;t consider the actual data spacing, nor does it investigate alternative units. And the algorithm was automated before a human had a chance to look at it and say &#8220;Huh??&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://peltiertech.com/WordPress/select-meaningful-axis-scales/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>You Have 1 New Notification On Klout!</title>
		<link>http://peltiertech.com/WordPress/you-have-1-new-notification-on-klout/</link>
		<comments>http://peltiertech.com/WordPress/you-have-1-new-notification-on-klout/#comments</comments>
		<pubDate>Mon, 16 Jan 2012 09:00:19 +0000</pubDate>
		<dc:creator>Jon Peltier</dc:creator>
				<category><![CDATA[Chart Axes]]></category>

		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=3357</guid>
		<description><![CDATA[Every so often I get an email with a subject line that&#8217;s something like &#8220;Jon, you have 1 new notification on Klout!&#8221; Wow, another social network thing, to go with all the other ones. Sure, I follow a bunch of people on Twitter every day, and I have a neglected Facebook account and a LinkedIn [...]]]></description>
			<content:encoded><![CDATA[<p>Every so often I get an email with a subject line that&#8217;s something like &#8220;Jon, you have 1 new notification on Klout!&#8221; Wow, another social network thing, to go with all the other ones. Sure, I follow a bunch of people on Twitter every day, and I have a neglected Facebook account and a LinkedIn account that I don&#8217;t know what it&#8217;s useful for yet. So I also have a Klout account.</p>
<p>My current Klout ranking?</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2012-01/klout0.png" alt="Klout" /></p>
<p>I dunno, I guess that&#8217;s pretty good. Some of my colleagues, and the people I follow on Twitter mostly fall in the range between 25 and 55. So who else has a 43? My fellow Excel chart master, <a href="http://www.excelcharts.com/blog/" rel="nofollow" class="vt-p" title="Jorge Camoes - Excel Charts" >Jorge Camoes</a>, has a 43. An old college buddy, Joel Foner, has a 43. So does fellow Microsoft Excel MVP <a href="http://www.excelguru.ca/blog/" rel="nofollow" class="vt-p" title="Ken Puls - Excel Guru" >Ken Puls</a>. <a href="http://www.thejuliagroup.com/blog/" rel="nofollow" class="vt-p" title="AnnMaria DeMars - The Julia Group" >Annmariastat</a> has a 43, and she doesn&#8217;t even have a Klout account, but she has a Wikipedia entry. So I&#8217;m in good company.</p>
<p><span id="more-3357"></span>There&#8217;s some kind of algorithm that determines this score, based on how many people I influence through my internet presence (I guess, how many people follow me), how much I influence them (how often they repeat what I say), and how influential the people I influence are.</p>
<p>The first thing I noticed when I followed the link in the email this morning (I delete most Klout emails without following the link) was this chart showing my score over the past month.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2012-01/klout1.png" alt="Klout Timeline" /></p>
<p>Wow, a few days ago, I really got a huge boost in my score.</p>
<p>Then I looked a little more closely, and read the axis labels. Over the past month, my score has ranged from about 42 to about 43.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2012-01/klout2.png" alt="Klout Timeline with Axis Labels" /></p>
<p>This is a good example of how the scale of a value axis can exaggerate or play down the variability in a signal. Here I&#8217;ve reproduced the Klout timeline in Excel:</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2012-01/klout3.png" alt="Klout Timeline Reproduced in Excel" /></p>
<p>The total variation in the displayed data is about ±1.8% from the mean. It looks ginormous when the visible Y axis scale is less than 5% of the maximum value. It doesn&#8217;t look so substantial when the Y axis scale starts at zero:</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2012-01/klout4.png" alt="Klout Timeline with Full Scale Y Axis" /></p>
<p>Maybe there&#8217;s a reasonable intermediate scale. This scale shows some variation, but it doesn&#8217;t look like a tsunami:</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2012-01/klout5.png" alt="Klout Timeline with Reasonable Y Axis Scale" /></p>
<p>Another funny thing about Klout is the listing of topics that I&#8217;m influential about. Data Visualization is rated Strong, and Visualization is rated High. Well, that&#8217;s good, those are topics I&#8217;d like to think I&#8217;m influential about. New England is rated High? Well, in season I will occasionally tweet about the Red Sox, but that&#8217;s the extent of my internet discussion about my home region. Statistics, Technology, good to see both of these here.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2012-01/klout6.png" alt="Klout Topics" /></p>
<p>But further down the list. Disease? Why am I listed for Disease? Sure, I&#8217;m a doctor, but not of medicine. As <a href="http://www.thelastlecture.com/" rel="nofollow" class="vt-p" title="Randy Pausch - The Last Lecture" >Randy Pausch</a>&#8216;s mother said of him, &#8220;He&#8217;s a doctor, but not the kind that helps people.&#8221;</p>
<p>Jorge Camoes (who also has a Klout score of 43) says Klout must think I&#8217;m sick (insert a pun here for influence/influenza). Klout tells Jorge that he is influential for Coffee, from which he abstains in real life.</p>
<p>Microsoft Excel falls far down my list of topics. Not lowest, but as far as the screen shot could capture. Why am I only Medium for Excel? I&#8217;m a Microsoft MVP for Excel, and Excel is one thing I talk a lot about.</p>
<p>I guess this Topics of Influence algorithm needs a bit of work.
<p>Peltier Technical Services, Inc., Copyright © 2011.<br /> <br /><span style="font: 80% Verdana,Tahoma,Arial,sans-serif;">Licensed under a <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/" rel="nofollow" rel="license" >Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>.<br /> <br />
<a href="http://www.exceluser.com/cmd.asp?Clk=1374689" rel="nofollow" ><IMG SRC="http://www.exceluser.com/images/info/pub/info_dash_c02.gif" ALT="Learn how to create Excel dashboards." WIDTH="468" HEIGHT="60" border=0></a><br />
<br /><img src="http://www.exceluser.com/cmd.asp?Imp=1374689" width="0" height="0" border="0"></p>
]]></content:encoded>
			<wfw:commentRss>http://peltiertech.com/WordPress/you-have-1-new-notification-on-klout/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Broken Y Axis in an Excel Chart</title>
		<link>http://peltiertech.com/WordPress/broken-y-axis-in-excel-chart/</link>
		<comments>http://peltiertech.com/WordPress/broken-y-axis-in-excel-chart/#comments</comments>
		<pubDate>Fri, 18 Nov 2011 16:09:16 +0000</pubDate>
		<dc:creator>Jon Peltier</dc:creator>
				<category><![CDATA[Chart Axes]]></category>
		<category><![CDATA[Panel Chart]]></category>

		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=3344</guid>
		<description><![CDATA[If you&#8217;re looking for a tutorial on breaking an axis scale, you won&#8217;t find it here. Instead you&#8217;ll read why breaking an axis is a bad idea, and you&#8217;ll get a tutorial in Panel Charts, which are a more effective (and easier) means to show your data. The Problem People frequently ask how to show [...]]]></description>
			<content:encoded><![CDATA[<p><em>If you&#8217;re looking for a tutorial on breaking an axis scale, you won&#8217;t find it here. Instead you&#8217;ll read why breaking an axis is a bad idea, and you&#8217;ll get a tutorial in Panel Charts, which are a more effective (and easier) means to show your data.</em></p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2011-11/Ybroken.png" alt="Chart with Broken Y Axis" /></p>
<h2><em>The Problem</em></h2>
<p>People frequently ask how to show vastly different values in a single chart. Usually they ask because a few very large values (for instance, Paris in June or Madrid in May in the chart below) overwhelm the other, relatively much smaller, values.</p>
<p><span id="more-3344"></span><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2011-11/Yunbroken.png" alt="Chart with Unbroken Y Axis" /></p>
<h2>Logarithmic Scale</h2>
<p>One suggestion is to use a logarithmic scale. For scientific data presented to scientific audiences, this is often an excellent suggestion. For the general public, and for general data, this may not be so useful. Especially in a bar chart, where the length of bars is important to comprehension, not some mathematical abstraction of length.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2011-11/Ylogarithmic.png" alt="Chart with Logarithmic Y Axis" /></p>
<h2>Broken Axis</h2>
<p>Another suggestion is to &#8220;break&#8221; the axis, so that part of the axis shows the small values, then another part of the axis shows the large values, with a section of the axis scale removed. Sounds good, but you&#8217;ve lost any correlation between the large and small values. Also our eyes are likely to see the two broken bars in the chart below as only about twice the value of the tallest of the unbroken values (despite our conscious brains &#8220;knowing&#8221; that the axis has been cut).</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2011-11/Ybroken.png" alt="Chart with Broken Y Axis" /></p>
<p>Another problem with this approach is that it&#8217;s cumbersome to create and nearly impossible to maintain charts like this.</p>
<h2>Panel Chart</h2>
<p>A better suggestion than either a log scale or a broken axis is to plot the data in a panel chart. This chart has two panels, one with an axis that shows all the data, the other with an axis that focuses on the small values. I generally advise strongly against using any kind of gradient in a chart, because the gradients are pretty much meaningless. In this chart, the gradient at the tops of the (truncated) large values are not meaningless, but are intended to show the large values extending high up into the clouds.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2011-11/Ydualpanelfade.png" alt="Chart with Panels Having Distinct Y Axis Scales" /></p>
<h2>Making the Panel Chart (It&#8217;s Easy!)</h2>
<p><em>If you want to play along at home, the data is located in <a href="http://peltiertech.com/images/2011-11/BrokenYData.csv" rel="nofollow" class="vt-p" title="Broken Y Axis Example Data" >BrokenYData.csv</a>.</em></p>
<p>The panel chart is really not too complicated. It consists of one set of data plotted on the primary axis and another set on the secondary axis. The primary axis data shows all the data using the full Y axis scale.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2011-11/panel1a.png" alt="Primary Axis Data" /></p>
<p>The secondary axis is scaled to show the smaller values. Note that the two very large values (&gt;30M) have been truncated at a suitably small value (7.5M).</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2011-11/panel1b.png" alt="Secondary Axis Data" /></p>
<p>When seen as part of a panel chart, the primary axis (left of chart) has been scaled so that its data occupies the top half of the chart.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2011-11/panel2a.png" alt="Upper (Primary Axis) Panel" /></p>
<p>The secondary axis (right) has been scaled to keep its data within the bottom half of the chart.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2011-11/panel2b.png" alt="Lower (Secondary Axis) Panel" /></p>
<p>It only takes a little experience, imagination, and knowledge of algebra to choose suitable scales. Fortunately readers of my blog are gifted in these characteristics.</p>
<p>The first step in creating this panel chart is to plot all six series (primary and secondary versions of the original three series).</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2011-11/panel3a.png" alt="All Data Plotted on Primary Axis" /></p>
<p>One by one, format the last three series to move them to the secondary axis. Then rescale the two axes as shown above, to allocate the primary and secondary to separate panels.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2011-11/panel3b.png" alt="Data Allocated to Primary and Secondary Axes, Axes Rescaled" /></p>
<p>Format the secondary series so they have the same fill colors as the corresponding primary series.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2011-11/panel4.png" alt="Matching Bars Formatted the Same" /></p>
<p>Clean up the axis labels using custom number formats: <tt>[&gt;=0]0,,"M";;;</tt> for the primary axis and <tt>[&lt;8000000]0,,"M";;;</tt> for the secondary axis. Remove the redundant legend entries: click once on the legend, then again on the duplicate label, and press Delete.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2011-11/panel5.png" alt="Axis Labels Cleaned Up" /></p>
<p>As I mentioned, use of gradient fills is usually useless or even harmful formatting. However, I&#8217;ve formatted the truncated bars in the bottom panel of this chart to (try to) indicate that they extend higher than their neighbors, into the clouds. Here are the settings I used. First I selected just the one data point (bar) by single clicking on it twice. The first click selects the whole series, the second selects just the one point. I chose a gradient direction that puts the light end of the bar at the top. I moved the middle gradient stop to 80%, so the gradient is confined to the very top of the bar. I set the bottom and middle gradient colors to the fill color of the series, and I set the top gradient color to white.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2011-11/GradientFillDialog.png" alt="An Effective Gradient Format" /></p>
<p>Here is the finished panel chart, repeated here for your viewing pleasure.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2011-11/Ydualpanelfade.png" alt="The Finished Panel Chart" />
<p>Peltier Technical Services, Inc., Copyright © 2011.<br /> <br /><span style="font: 80% Verdana,Tahoma,Arial,sans-serif;">Licensed under a <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/" rel="nofollow" rel="license" >Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>.<br /> <br />
<a href="http://www.exceluser.com/cmd.asp?Clk=1374689" rel="nofollow" ><IMG SRC="http://www.exceluser.com/images/info/pub/info_dash_c02.gif" ALT="Learn how to create Excel dashboards." WIDTH="468" HEIGHT="60" border=0></a><br />
<br /><img src="http://www.exceluser.com/cmd.asp?Imp=1374689" width="0" height="0" border="0"></p>
]]></content:encoded>
			<wfw:commentRss>http://peltiertech.com/WordPress/broken-y-axis-in-excel-chart/feed/</wfw:commentRss>
		<slash:comments>45</slash:comments>
		</item>
		<item>
		<title>Fake Line Chart (Dummy XY Series for X Axis)</title>
		<link>http://peltiertech.com/WordPress/fake-line-chart-dummy-xy-series-for-x-axis/</link>
		<comments>http://peltiertech.com/WordPress/fake-line-chart-dummy-xy-series-for-x-axis/#comments</comments>
		<pubDate>Tue, 31 Aug 2010 07:00:43 +0000</pubDate>
		<dc:creator>Jon Peltier</dc:creator>
				<category><![CDATA[Chart Axes]]></category>
		<category><![CDATA[dummy series]]></category>
		<category><![CDATA[Line Chart]]></category>
		<category><![CDATA[xy chart]]></category>

		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=3223</guid>
		<description><![CDATA[In Excel, the difference between Line charts and XY charts has nothing to do with formatting the data with or without lines, and everything to do with different behavior of the X axes in the charts. I&#8217;ve written about these differences numerous times, in X Axis: Category or Value?, Scatter Chart or Line Chart?, Line-XY [...]]]></description>
			<content:encoded><![CDATA[<p>In Excel, the difference between Line charts and XY charts has nothing to do with formatting the data with or without lines, and everything to do with different behavior of the X axes in the charts. I&#8217;ve written about these differences numerous times, in <a href="http://peltiertech.com/Excel/ChartsHowTo/CatVsValueAxis.html" rel="nofollow" title="X Axis: Category or Value?" >X Axis: Category or Value?</a>, <a href="http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=190" rel="nofollow" title="Scatter Chart or Line Chart?" >Scatter Chart or Line Chart?</a>, <a href="http://peltiertech.com/WordPress/line-xy-combination-charts/"title="Line-XY Combination Charts | Peltier Tech Blog | Excel Charts" >Line-XY Combination Charts</a>, and in innumerable forum and newsgroup posts.</p>
<h2>Comparison of Line Charts and XY Charts</h2>
<p>Essentially, the difference is that Line charts plot X values as nonnumerical categorical values, like {A, B, C}; XY charts treat X values as continuously varying numerical values. Here is a brief comparison of the two chart types:</p>
<table style="width: 100%;" border="0">
<tbody>
<tr valign="top">
<td width="48%"><strong><em>Line Charts</em></strong></td>
<td width="4%"></td>
<td width="48%"><strong><em>XY Charts</em></strong></td>
</tr>
<tr valign="top">
<td width="48%">Nice date scaling (e.g., first of each month)</td>
<td width="4%"></td>
<td width="48%">No special date scaling</td>
</tr>
<tr valign="top">
<td width="48%">Integer values only: Data plotted directly on category or on integer day numbers (midnight at start of each date)</td>
<td width="4%"></td>
<td width="48%">Continuous values: Data plotted anywhere along axis (e.g., any fractional time of day, not just midnight)</td>
</tr>
<tr valign="top">
<td width="48%">All series use same X values (same dates or categories)</td>
<td width="4%"></td>
<td width="48%">Each series uses independent X values</td>
</tr>
<tr valign="top">
<td width="48%"><em>Identical series formatting:<br />
lines or no lines, markers or no markers</em></td>
<td width="4%"></td>
<td width="48%"><em>Identical series formatting:</em><br />
<em>lines or no lines, markers or no markers</em></td>
</tr>
<tr valign="top">
<td width="48%">Only vertical (Y) error bars can be applied</td>
<td width="4%"></td>
<td width="48%">Vertical (Y) and horizontal (X) error bars may be applied</td>
</tr>
<tr valign="top">
<td width="48%"></td>
<td width="4%"></td>
<td width="48%"></td>
</tr>
</tbody>
</table>
<h2>A Typical Line Chart</h2>
<p>A user is simply trying to create an XY scatter plot in Excel where the X axis values as shown in the example below can be maintained as-is on the final graph&#8217;s X axis points:</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-08/LineData01.png" alt="Line Chart Data" /></p>
<p><span id="more-3223"></span>This data is perfectly suited for a line chart.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-08/LineChart01.png" alt="Line Chart" /></p>
<p>When you try to use the data in an XY chart, Excel ignores the non-numerical X values, and substitutes counting numbers, 1 for the first category, 2 for the second, etc.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-08/XYChart01.png" alt="XY Chart Step 1" /></p>
<p>For some reason, the user is insisting that a scatter plot is used, and all they want is the X axis to end up exactly as the line graph is formatted. I suspect this is due to a lack of understanding of the axis differences above, but I&#8217;ll never know, because this user is someone else&#8217;s client.</p>
<h2>Making an XY Chart Mimic a Line Chart</h2>
<p>An XY chart can be used to display this data, but it is a poor second choice. The tricks that are needed to make an XY chart display the nonnumeric labels like a line chart make the fake labels static, and they must be rebuilt if the amount of data expands, or if rows are inserted or deleted.</p>
<p>But I understand users, so here is the second option, which is what he thinks he wants, not what he needs.</p>
<p>We need to adjust the data. Since the Line chart X values are unsuited for an XY chart, we must insert a column of valid X values. To accommodate the Line chart style axis labels, we will use a dummy XY series along the X axis, which serves as placeholders for data labels which will look like the Line chart labels. The dummy series uses the column of zeros.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-08/XYData01.png" alt="XY Chart Data" /></p>
<p>Select the yellow shaded range, and make an XY chart.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-08/XYChart02.png" alt="XY Chart Step 2" /></p>
<p>Hide the standard X axis labels but maintain the margin beneath the axis by using custom number format of &#8221; &#8221; (space character). If you simply format the axis with no labels, the plot area will be too close to the bottom of the chart, without leaving room for the dummy labels.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-08/XYChart03.png" alt="XY Chart Step 3" /></p>
<p>﻿Use Rob Bovey&#8217;s <a href="http://appspro.com/Utilities/ChartLabeler.htm" rel="nofollow" title="Rob Bovey's Chart Labeler" >Chart Labeler</a> (a free utility that is indispensable for creating and manipulating custom labels) to label the dummy series. Apply the labels in the first column of the data (not shaded yellow in my example) to the &#8220;Label&#8221; series.</p>
<p>Each label remains linked to its cell. If the chart stays at 4 points using the same range, the labels will update as these cells are changed. Stretching the range or inserting/deleting rows will force you to rebuild the axis.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-08/XYChart04.png" alt="XY Chart Step 4" /></p>
<p>Finally hide the &#8220;Label&#8221; series by formatting it without markers or lines.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-08/XYChart05.png" alt="XY Chart" /></p>
<p>That&#8217;s a long way to go to mimic a completely dynamic Line chart with an XY chart which may need subsequent maintenance if the data changes. The wrong wrench, as we say, to hammer in the wrong screw.</p>
<h2>Peltier Tech Update</h2>
<p>Last week I had the pleasure of attending the <a href="http://www.juiceanalytics.com/" rel="nofollow" title="Juice Analytics" >Juice Analytics</a> <strong>Viva Visualization</strong> tour at the <a href="http://www.juiceanalytics.com/writing/juice-boston-tea-party/" rel="nofollow" title="Juice Boston Tea Party" >Juice Boston Tea Party</a>. They served breakfast, then presented their take on data visualization. Basically, they remind us to send a message, keep the visualization simple, put it in context, and follow good design fundamentals. We&#8217;ve heard the message many times before, but it&#8217;s worth retelling, especially by these experts who build solutions for big clients. Among the takeaways are:</p>
<ul style="margin-left: 24pt;">
<li>Don&#8217;t let novelty obscure the data.</li>
<li>Don&#8217;t let visuals obscure the data.</li>
<li>Choose the right chart type.</li>
</ul>
<p>There is a lot of great content on the Juice web site and blog, including a guide for <a href="http://chartchooser.juiceanalytics.com/" rel="nofollow" title="Chart Chooser" >choosing the right chart</a>.</p>
<p>The <strong>Learning As You Go</strong> blog has a nice article about plotting highly skewed data, at <a href="http://tomhopper.wordpress.com/2010/08/30/graphing-highly-skewed-data/" rel="nofollow" title="Graphing Highly Skewed Data - Learning as You Go" >Graphing Highly Skewed Data</a>. The article covers use of secondary axes (a bad idea), breaks in the axis (also a bad idea), logarithmic axis scales (okay if users understand log scales), and multiple charts. This article is a response to a discussion started by <strong>Chandoo</strong> in <a href="http://chandoo.org/wp/2010/08/20/charts-with-small-and-large-values/" rel="nofollow" title="How do you make charts when you have lots of small values but few extremely large values? Chandoo.org - Learn Microsoft Excel Online" >How do you make charts when you have lots of small values but few extremely large values?</a>
<p>Peltier Technical Services, Inc., Copyright © 2011.<br /> <br /><span style="font: 80% Verdana,Tahoma,Arial,sans-serif;">Licensed under a <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/" rel="nofollow" rel="license" >Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>.<br /> <br />
<a href="http://www.exceluser.com/cmd.asp?Clk=1374689" rel="nofollow" ><IMG SRC="http://www.exceluser.com/images/info/pub/info_dash_c02.gif" ALT="Learn how to create Excel dashboards." WIDTH="468" HEIGHT="60" border=0></a><br />
<br /><img src="http://www.exceluser.com/cmd.asp?Imp=1374689" width="0" height="0" border="0"></p>
]]></content:encoded>
			<wfw:commentRss>http://peltiertech.com/WordPress/fake-line-chart-dummy-xy-series-for-x-axis/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Why Are My Excel Bar Chart Categories Backwards?</title>
		<link>http://peltiertech.com/WordPress/bar-chart-categories-backwards/</link>
		<comments>http://peltiertech.com/WordPress/bar-chart-categories-backwards/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 05:00:12 +0000</pubDate>
		<dc:creator>Jon Peltier</dc:creator>
				<category><![CDATA[Chart Axes]]></category>
		<category><![CDATA[Axis Labels]]></category>
		<category><![CDATA[category axis]]></category>

		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=2635</guid>
		<description><![CDATA[I came across a blog post called Is it just me? (software defaults), which asks the age-old question, Why Are My Excel Bar Chart Categories Backwards? The post was in a new blog by Alex Kerin of Data Driven Consulting. Alex works on projects in analytics and dashboarding. I have been asked this question a [...]]]></description>
			<content:encoded><![CDATA[<p>I came across a blog post called <a href="http://blog.datadrivenconsulting.com/2009/11/is-it-just-me-software-defaults.html" rel="nofollow" title="Is it just me? (software defaults) | Data Driven Consulting" >Is it just me? (software defaults)</a>, which asks the age-old question, <em><strong>Why Are My Excel Bar Chart Categories Backwards?</strong></em> The post was in a new blog by <strong>Alex Kerin</strong> of <a href="http://www.datadrivenconsulting.com/" rel="nofollow" >Data Driven Consulting</a>. Alex works on projects in analytics and dashboarding.</p>
<p>I have been asked this question a number of times, and being a founding member of <a href="http://peltiertech.com/WordPress/category/chart-busters/"title="Chart Busters - Peltier Tech Blog" >Chart Busters</a>, of course I know the answer. I&#8217;ve answered the question a number of times, but if I answer it here, it will become available for the ages.</p>
<p>I describe the problem and how to correct it. If you are really interested, I finish with an explanation of why this happens.</p>
<p><strong><span id="more-2635"></span>The Problem</strong></p>
<p>Let&#8217;s use some very simple data to illustrate the problem.</p>
<p><img src="http://peltiertech.com/images/2009-11/AxisOrderData.png" alt="Data for bar chart axis order study" /></p>
<p>Let&#8217;s make a simple bar chart.</p>
<p><img src="http://peltiertech.com/images/2009-11/AxisOrderBarWrong.png" alt="Bar chart with backwards category labels" /></p>
<p>The labels were sorted from top down in the worksheet, but they appear from bottom up along the chart axis.</p>
<p><strong>The Fix</strong></p>
<p>It&#8217;s easy, if tedious, to correct the order of category axis labels. Select the axis, press Ctrl+1 (numeral one), the universal shortcut in Excel for <em><strong>Format This Object</strong></em>, and in Excel 2003 the following dialog appears.</p>
<p><img src="http://peltiertech.com/images/2009-11/AxisOrder2003dlg.png" alt="Excel 2003 Format Axis Scale Dialog" /></p>
<p>The fix is simple: check the two boxes for <em><strong>Categories in reverse order</strong></em> and <em><strong>Value (Y) axis crosses at maximum category</strong></em>.</p>
<p>The protocol in Excel 2007 is the same, except the dialog looks a little different. You select the same options, but they are located far apart on the dialog.</p>
<p><img src="http://peltiertech.com/images/2009-11/AxisOrder2007dlg.png" alt="Excel 2007 Format Axis Scale Dialog" /></p>
<p>This changes the order of axis labels in our bar chart.</p>
<p><img src="http://peltiertech.com/images/2009-11/AxisOrderBarCorrect.png" alt="Bar chart with appropriately ordered category labels" /></p>
<p>If you forget to make the value axis cross at the maximum category, the axis will now appear at the top of the chart. After reversing the order of the categories, the maximum category is at the bottom of the axis.</p>
<p><img src="http://peltiertech.com/images/2009-11/AxisOrderBarHalfRight.png" alt="Bar chart with appropriately ordered category labels but value axis on top" /></p>
<p><strong>Why Does Excel Do That, Anyway?</strong></p>
<p>If we use the same data to make a column chart (line and area chart, too), the labels go from left to right, as expected.</p>
<p><img src="http://peltiertech.com/images/2009-11/AxisOrderColumnCorrect.png" alt="Column chart with correct category label order" /></p>
<p>Take another look at the column chart, and note where the origin of the axis system is located. I&#8217;ve indicated the origin with a red circle.</p>
<p><img src="http://peltiertech.com/images/2009-11/AxisOrderColumnOrigin.png" alt="Column chart with origin encircled" /></p>
<p>The values start low (at zero in this case) at the origin and increase in value as they move away from the origin. The category labels start with the first one next to the origin and later labels in the list extend further from the origin.</p>
<p>Now look at the bar chart and consider the origin of its axis system.</p>
<p><img src="http://peltiertech.com/images/2009-11/AxisOrderBarOrigin.png" alt="Bar chart with origin encircled" /></p>
<p>The values start low (zero) at the origin and increase in value as they move away from the origin. The category labels start with the first one next to the origin and later labels in the list extend further from the origin. Just like in the column chart.</p>
<p>Perhaps this is better illustrated if we remove the category data from the bar chart. In this case, Excel uses the counting numbers 1, 2, 3, etc. in place of the empty categories.</p>
<p><img src="http://peltiertech.com/images/2009-11/AxisOrderBarOriginNoCats.png" alt="Bar chart with origin encircled and counting numbers used for category labels" /></p>
<p>Both axes have low numbers next to the origin and higher numbers further away.</p>
<p>The whole problem arises because Excel follows the same axis ordering scheme for bar chart category axes as for any other axis in any other chart.</p>
<p>This describes the mechanics of axis label ordering. But, 99% of the time, a user expects the axis labels to go in the same order top to bottom as in the data source. <em><strong>Why Are My Excel Bar Chart Categories Backwards?</strong></em> is still a valid question: Why can&#8217;t bar chart categories automatically be reversed? Alternatively, why can&#8217;t the options for a bar chart&#8217;s category axis default to:</p>
<p><img src="http://peltiertech.com/images/2009-11/AxisOrderDlgSettings.png" alt="Alternate Defaults for Bar Chart Category Axes" /></p>
<p>Works for me.</p>
<p>Peltier Technical Services, Inc., Copyright © 2011.<br /> <br /><span style="font: 80% Verdana,Tahoma,Arial,sans-serif;">Licensed under a <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/" rel="nofollow" rel="license" >Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>.<br /> <br />
<a href="http://www.exceluser.com/cmd.asp?Clk=1374689" rel="nofollow" ><IMG SRC="http://www.exceluser.com/images/info/pub/info_dash_c02.gif" ALT="Learn how to create Excel dashboards." WIDTH="468" HEIGHT="60" border=0></a><br />
<br /><img src="http://www.exceluser.com/cmd.asp?Imp=1374689" width="0" height="0" border="0"></p>
]]></content:encoded>
			<wfw:commentRss>http://peltiertech.com/WordPress/bar-chart-categories-backwards/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

