Hacker News new | past | comments | ask | show | jobs | submit login
Using axis lines for good or evil (dynomight.net)
64 points by surprisetalk 6 months ago | hide | past | favorite | 21 comments



This…this is certainly a take. Of all the takes about axis scaling and border lines, this is certainly one of them.

The author is confusing axis scaling with axis aesthetics. Whether there’s an axis line is entirely separate from what the starting value is. I’d even go as far to argue that the authors chosen axis styling from the first 4 examples is the among least consistent and least readable of the options.

Put axis lines on your graphs, up to you, live your best, aesthetically pleasant and consistent life. Do, however: under threat of never being allowed near a computer to make a graph ever again- correctly _scale_ your axis values correctly.


I don't think they're confusing anything.

> Whether there’s an axis line is entirely separate from what the starting value is.

The entire point of the article is demonstrating that this is incorrect. I think they do a convincing job.


The author explains the reasoning behind their position. But you’re not even making an argument, just declaring the author weird.


Whether axes are drawn or not is partly a typographical concern too. If those facilitate easier reading of the graph, than foregoing them because the distance to the axis of a data point isn't relative seems a bit strong.

For cases where an axis is truncated (e.g., with currency amounts where 0 is meaningful, but where showing the graph with 0 wouldn't give an easily understood graph like the example given for the $50T to $53T range), just use a graph break symbol (that squiggly thing near the origin point) to clearly indicate that the axis is truncated.


Not zeroing a graph is usually a sign of trying to send a message or manipulate the reader. In that graph, basing the Y on 50T shows a worrying drop, that is not true as you can see if you base on 0T. You can base in 25T and it will show a moderate fall. Or you can base on 50T and making the graph taller to show a catastrofic fall.

If you need a graph focusing on a narrow range, make a new category, like "loss in %" and you will move in the 0-6 range instead of 50-53.


Here's your temperature graph.

    |
    |--------------- (something near room temperature)
    |
    |
    |
    |
    +--------------- (absolute 0)
0 isn't magic, there's different starting points depending on the data, it's not a manipulation as long as you clearly mark that the truncation happened. I like the idea of not including the axis line, I'm fine with the graph break on the axis as well. Anything as long as it's obvious.


You can zero at an arbitrary point, but the point is that it forces you to explain your zero. For example, for "room temperature" you might zero at 0ºC, a value that can be easily reached in winter. For "body temperature" you can zero at 37ºC and stretch the scale +-5ºC (aprox. the survivable range), and the graph would show fever vs non-fever. You clearly are not after some deception.

For a graph of earnings or net income, you should zero at either 0T (you can have zero earnings or even negative earnings, or you can have zero income), or zero at some point that you must explain and makes sense (e.g. zeroing Boeing earnings at Boeing + MD merger).

But in my experience, when someone zeros the scale at an arbitrary point, he's after a deception. I've seen graphs zeroed randomly and without explanation at 5000, and the scale going from 5000 to 5004, with the points going wildly from the top to the bottom and back again. "Wow, what a wild ride!", but in reality it was as stable as it could be. There are a lot of examples of this in business anual/quarter reports.


> there's different starting points depending on the data

I dunno, your temperature example is a perfect counter-example to this. What absolute starting point would you use for temperature?


If it's human temperature I would use something near 36.6 C, obviously? Probably 35 C.

If it's air temperature outside I would use 0 C.

If it's cooking temperature I would still use 0 C, not absolute zero.

Actually the only case in which absolute zero seems like the sensible answer I can think of is superconductors' critical temperatures and other physical stuff.


None of that makes any sense. There's nothing special about 35C or 0C. The whole point of the article is that it's visually misleading to have lines at arbitrary points.

For your first example a line at average body temperature would make sense though.


Hypothermia starts under 35 C

Around 0 C it starts snowing instead of raining, and standing bodies of water freeze. If you have plants outside and it's not winter - they will die if it gets under 0 C. If you're driving - the road will freeze under 0 C and it's pretty dangerous to drive fast in such conditions. I'd argue there's no more important air temperature than 0 C on Earth-style planets.

For cooking 100 C is a reference (water boils), but it's a bad starting temperature because you start lower than that. It's important to show room temperature (around 20 C), boiling temperature (around 100 C) and the maximum useful temperature (around 250 C). So starting at 0 C makes sense.


But there is something special about both of those temperatures because they matter greatly to humans. This graphs should be designed to make referencing agains those values easy, where that is going to be useful.


Interesting thoughts on using axis lines only when the relative comparison is meaningful, though I don’t think the downsides to superfluously adding them outweigh the other design benefits like providing clear bounds and a visual anchor to attach tick marks to. The article seems a bit objectivist but I think the right tradeoffs depend on the context as well as the data


I don't mind this stylistic choice, but I think the author's rule proves too much. If one scale is arbitrary, why is there a graph at all? The impact of the axis line is surely much smaller than the chart itself.


The author appears to be overlooking the usefulness of comparisons to relevant averages or historical highs and lows - clearly such comparisons can be useful when plotting meteorological data, for example. Furthermore, it does not follow that, in those cases, all data should be in the form of differences or ratios with respect to the relevant datum.

From these considerations, the author's principle could be generalized to 'lines should be meaningful.'


Great advice! The matplotlib default is really bad. Maybe it has the excuse that matplotlib is designed for interactive visualisation (like MATLAB) rather than actually publishing graphs, for which you should use something good like https://glx.sourceforge.io/ ... although I have seen people publishing matplotlib graphs so they really should have sane defaults.


Does this page use HDR effects to highlight on hover?


HDR as in high dynamic range? That usually is talking about more bit depth in video. What are you talking about here?


When you hover over the graphs, they get 'brighter'.


How is that "HDR"?


A few websites have demonstrated an effect where you can use an HDR video to add brighter-than-otherwise-possible colors to a UI on certain devices, eg https://notes.dt.in.th/HDRQRCode.

But that's not being used here. Instead, in dark mode the site just sets images to 75% opacity and animates them up to 100% on hover. That's the only place on the page where you see a huge block of pure white, so it looks brighter than everything else (even though the text is also pure white).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: