Hacker News new | past | comments | ask | show | jobs | submit login
One Chart, Twelve Charting Libraries (lisacharlotterost.github.io)
212 points by ingve on May 21, 2016 | hide | past | favorite | 43 comments



I can only speak for R but I guess it's the same for all of them: With just very few options the output can be vastly different.

Have a look at some basic ggplot2 examples (all examples were made from the same data): http://tutorials.iq.harvard.edu/R/Rgraphics/Rgraphics.html

I hate to be negative, but this overview is useful only for people who don't really need it - who want to have a look but not actually do anything with it. It's not useful to select a library (especially since it compares completely different languages), and if you already know which system and language to go with it's not useful either.

If you think about learning R: If you don't also learn (a significant amount of) statistics it's a waste of time IMHO. There are (free, if you ignore the "verified certificate" options) courses available on Coursera and edX - even Microsoft has one (on edX). It's worth it - and I mean learning the statistics, not just R. Even if you don't think you need it professionally. Don't try using R as a "graphics" (plotting) or even a programming package - quite frankly, it's not very good at the latter (all modern "real" programming languages are better and more consistent and less "hacky"), but to work your way through lots of DATA quickly R is beautiful.


Hi there, author here. I agree that the post is "not useful to select a library", especially because it just compares one very specific visualisation form. I'm working on a third, more high-level view on data vis tools and hope this one will be more useful for choosing a library.


I think the post is useful as an overview of a lot of options, and how hard they are to get started with.

True, you'd use R charts because your data and analysis are in R, you wouldn't use R because of the charts.


Hm, I don't think you can speak for everybody. I find myself (re)creating a chart in R quite often. I sometimes create visualisations for print, and I just want an SVG or PDF to then import to Illustrator. Before I knew that you can export PDFs in Tableau, I often used Tableau for the analysis part and then went to R to recreate the same chart and export as PDF.


hey, if it works! though doing analysis in Tableau and charts in R does make me cringe a little … https://goo.gl/9mgTTI


Very strongly disagree that understanding statistics is a prerequisite to learning R. There is a lot you can do with R with understanding statistics.

I also dislike the claim that R is not a real programming language. It is. Just because it makes different choices to other popular languages doesn't make it a toy.


> is a prerequisite to learning R

Which is not what I said, so I have no idea what exactly you "very strongly" disagree with - it's all in your head. You disagree with your own vivid imagination.

> I also dislike the claim that R is not a real programming language

The only one saying that is YOU!

This is you - "Dick from the Internet": http://dilbert.com/strip/2015-06-07

Making up stuff to (strongly, of course!) disagree with!


Great post... The two I would have been interested in seeing, if they support that type of chart, are Google Charts and plotly.js. (maybe I'll look into it if no one else does)

Pretty curious to see what else people come up with in comments...


Hi, author here. Plotly was the biggest surprise for me when I was writing the two blog posts, and I definitely want to try out plotly.js as well. Could take a few weeks, though :) Go ahead and recreate that chart yourself! I already had John Muyskens from the Washington Post Graphics team add the brand news Python Leather library to the repo: https://github.com/OpenNewsLabs/onechart-twelvechartinglibra...


Agreed, when I looked at every JS plotting library that I could find about a year ago, those two were far and above the winners for open- and closed-source, respectively. Now plotly is free and open source and seems unmatched in its abilities.

The author also had the same experience that I had with the "reusable" libraries built on d3: none of them really work that well either because of bugs or their inflexible interface.


A performance comparison would be good. I was trying to plot an audio file (say 1 million points - something that Matlab could easily handle) and totally failed to find a graphing library that didn't fail miserably on it.



I have used http://dygraphs.com for plotting audio with very good results.


That does look good...


Any libraries that are fast enough to do this are probably smoothing anyways - but I agree, the library should do that for you - rather than requiring additional user effort. Also not sure does e.g. matplotlib not do this?


Couldn't you just downsample the wave file?


I don't know why you are getting down voted. This is the correct answer; when a screen only has 1000 pixels of graph you can't plot more than 2000 points of time domain data, max and min of each column. As you zoom in resample for the correct range. Influxdb can help do this, very quickly. I can allow up to 200000 points of raw data before I need to do any pre-computation and still maintain a 100 ms charting latency target.


But then I can't see the original samples if I zoom in. Plus that is a workaround rather than a fix.


My Veusz package can handle that in a second or two if anti-aliasing is switched off. It takes a 1.5-2x longer with anti-aliasing on.


Thanks, I found this interesting.

> And I couldn’t combine a log-scale with setting the domain of the x-scale to zero

I don't think it's mathematically possible to have a log scale start at zero, you just make the exponent more and more negative. The first two charts look like you've done it but they're not correct--you don't want the values to be log, you want the scale to be log. In ggplot2 you do this by adding "scale_x_log10()" to the plotting expression, and in native R you usually pass log="x" (I believe).


Great point! I'm surprised that nobody else noticed that so far :) sometimes I set the values to log because I couldn't find an option to set the scale to log, but you're right, in R and ggplot2 I should use your described options.


And on a log scale you probably want to set the minimum value to 1 since the log of zero is negative infinity (I suspect that's the root cause of your ggvis problem)


Most of these new charting libraries seem to be specialized to "data science" or statistics or whatever. R's plotting thing and ggplot are quite nice for stats... most of the javascript plotting libraries are okay. I still haven't found anything that makes plots as nice as Igor Pro or Origin Pro with as fast an update rate, AND features zooming and movable cursors. Yeah yeah you can hack them in with matplotlib but who really wants to do that?


Was looking forward to reading the article but I'm on an ipad and the left-hand menu seems to overlap the main body content?


Sorry for that; fixed it!


Thanks so much. Just spent an hour reading articles on your blog. Very informative


Oh I'm glad to hear that! Let me know if you have any ideas for future blog posts :)


Turn sideways?


"Don't hold it like that"


Not a charting library, but much faster and doesn't require any code - here's my alternate take using Tableau:

https://public.tableau.com/views/WorldHealth_4/WorldCountryH...


Hi there, thanks so much! I also tried 12 applications for data vis here; including Tableau: http://lisacharlotterost.github.io/2016/05/17/one-chart-tool...


Would you have a look at Vize Software ? (Disclaimer: I'm a cofounder) :)


Looks great for big datasets; respect! A small thing: Why did you decide to bring the "Modifier" panel to the right-hand side of the screen? Lyra is doing the same thing. It results in SUCH a long way to drag your variables. Besides that: Neat tool! Hope you'll be successful with it.


Thank you :) Funny you mention that, we're in the process of wrapping up a UI overhaul, and the modifiers panel is right next to the variables one. Meanwhile in the current version you can also double-click to have your variables added automatically to whichever chart you're on (based on a charts suggestion engine).


d3 is way overkill for static chart (i skimmed your code and there's no callback for events)

Interactives are what missing from others. Sure you can see the largest circle, wonder what that is, look up csv, ... second largest circle? rinse repeat. wasting time? sure

with d3, you can hover a circle and get its horiz and vert rule to indicate its center's position on x and y axis -- also a small popup box for simple info, like name, id, etc.

you can summon external vis by clicking on said circle and say, a table appears under the chart, showing rows of data relevant to said circle, or ... other charts for the matter.

the code is not terribly long. i did it 3 years ago.

i don't know how to do interactive chart like i did in d3 in matplotlib, granted i haven't touched matplotlib for 13 years (i think i used numarray back then and feed the result to matplotlib because i refused to use matlab)


Great article! I wouldn't mind if you were even more opinionated. If I was looking for a charting library I'd very much like to know what you consider really good and what stinks. Especially with this much research.


Are there good comparisons to Mathematica?


Why did he dislike Bokeh because it used Canvas over SVG? From what I've seen, the performance of each really depends on what you are doing with it.


These comments are pretty nit-picky. Great article, thanks !


This really doesn't do much for me. Any chart that fits into an examples page is pretty sure to look pretty good and be pretty easy to make with charting library X.

You don't really find out X was a bad choice until you run into obscure problems Z1, Z2, Z3.


Deep eye roll on this.

Experts are chiming to show that with a few tweaks the output could be better for their respective lib, as they should. I really don't like comparisons like this. Not helpful.


God can I delete this comment to make the down votes stop?


When you find yourself in a hole...




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

Search: