

Tufte in R - trengrj
http://motioninsocial.com/tufte/

======
minimaxir
I've done a lot of work writing how to make nice plots in R/ggplot2
([http://minimaxir.com/2015/02/ggplot-
tutorial/](http://minimaxir.com/2015/02/ggplot-tutorial/)), but I admit that a
lot here is new to me.

As the Tufte code samples indicate, plotting using base R graphics can be
headache inducing, though, which is why the inclusion of a ggplot2
implementation is helpful. The other themes included with ggthemes seem pretty
interesting as well.

An important thing to note about plotting with R is that if you can, you
should use R in OS X for antialiasing. It makes a very notable difference for
high-res charts (see my post), and it's clear that there's a lot of pixelation
around the text and lines in the OP. Here's the Tuft line ggplot2 plot
rendered on my MacBook:
[http://i.imgur.com/DC6TgW9.png](http://i.imgur.com/DC6TgW9.png)

~~~
jacobolus
Can’t you just export a vector file and then let whatever other renderer (e.g.
a browser) handle the antialiasing?

Edit: I don’t think I understand your complaint. The graphics in the original
article are antialiased. Are you just saying their antialiasing algorithm
isn’t as good?

Here’s what your version (on the left) looks like when rescaled (using Preview
on OS X to rescale) to about the same size as theirs; the two seem roughly
comparable: [http://i.imgur.com/LWCeAPj.png](http://i.imgur.com/LWCeAPj.png)

(I think the reason for the difference in apparent line/font weight in my
picture there is that Preview properly downscales in a linear (not gamma-
encoded) color space, whereas most vector antialiasing/rasterizing algorithms,
including both Quartz and Cairo AFAIK, work in a gamma-encoded space). If you
had generated the image at the same original size, I suspect it would look
extremely similar to the one in the blog post.

~~~
otsaloma
> Can’t you just export a vector file and then let whatever other renderer
> (e.g. a browser) handle the antialiasing?

You can. In my experience, for good quality, it's best to output graphics from
R as PDF and if you need a rasterized version, do that separately with
pdftoppm or something with a dpi chosen based on where it will be shown.

------
johnminter
I am certainly no fan of "chartjunk" and value clear graphics, I do not see
the value of removing the lines on the axes. I find them to be valuable visual
cues. I would also note that Tufte used them in his books, for example:
([http://www.edwardtufte.com/bboard/q-and-a-fetch-
msg?msg_id=0...](http://www.edwardtufte.com/bboard/q-and-a-fetch-
msg?msg_id=0003uk)).

~~~
rout39574
A couple points:

First, DAPP is 1974; _VISUAL DISPLAY_ was 1983. Critique based on "once, you
did something different" seems misplaced.

Second, if you read _VISUAL DISPLAY_, you'll see that there's plenty of room
for individual judgement in the principles he espouses. Tufte is no dogmatist.
If you think the chart needs more ink, put it in and don't worry about the
response from ideologues.

Third, it would be useful for you to attempt to articulate to yourself the cue
value of the line, (as opposed to the tics). You might find that, when you try
to describe to yourself what it does, that you're describing comfort with
common pattern.

------
100k
This looks really nice. The resources linked to are also cool:

[http://www.daveliepmann.com/tufte-css/](http://www.daveliepmann.com/tufte-
css/)

[http://sachsmc.github.io/tufterhandout/](http://sachsmc.github.io/tufterhandout/)

------
vonklaus
I've been using Tufte all day today. First to make an email template for my CV
and then a theme for MOU so i can take some clean notes. Man, this is just so
good, like really really good, I am almost embarassed by comparison. Super
cool, great job.

~~~
hudibras
What do you mean by "an email template for my CV?"

~~~
vonklaus
I used tufte css and some added styles and made an email template. It has a
heading and signature, and allows for annotated notes in the body. I am going
to write a cover letter and send it that way.

~~~
hudibras
So the body of the email is formatted like a CV? If so, sounds like a good
idea.

------
naboonga
Anyone know how hard this would be to do in python?

~~~
Lofkin
I would suggest either using this:
[https://github.com/yhat/ggplot](https://github.com/yhat/ggplot)

or this :
[https://github.com/bokeh/bokeh/pulse](https://github.com/bokeh/bokeh/pulse)

