
One Chart, Twelve Charting Libraries - ingve
http://lisacharlotterost.github.io/2016/05/17/one-chart-code/
======
LionessLover
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](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.

~~~
RockyMcNuts
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.

~~~
lisacrost
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.

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

------
RockyMcNuts
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...

~~~
lisacrost
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...](https://github.com/OpenNewsLabs/onechart-
twelvechartinglibraries)

------
IshKebab
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.

~~~
nharada
Couldn't you just downsample the wave file?

~~~
Cerium
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.

------
jcheng
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).

~~~
lisacrost
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.

~~~
hadley
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)

------
gaze
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?

------
krmmalik
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?

~~~
lisacrost
Sorry for that; fixed it!

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

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

------
sleazebreeze
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...](https://public.tableau.com/views/WorldHealth_4/WorldCountryHealthIncomeandPopulation)

~~~
lisacrost
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...](http://lisacharlotterost.github.io/2016/05/17/one-chart-tools/)

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

~~~
lisacrost
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.

~~~
kb3n
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).

------
clitmouse
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)

------
jtchang
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.

------
jessriedel
Are there good comparisons to Mathematica?

------
daemonhunter
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.

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

------
forgotpwtomain
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.

------
ryanmarsh
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.

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

~~~
zaroth
When you find yourself in a hole...

