[UFO Chicago] In praise of matplotlib

Jordan Bettis jordanb at hafd.org
Mon Jan 5 19:19:52 PST 2009


On Sat, Jan 03, 2009 at 07:51:59PM -0600, Brian Sobolak wrote:
> 
> 
> 
> On Jan 3, 2009, at 19:29, "Jay F Shachter" <jay at m5.chicago.il.us> wrote:
> 
> > Centuries ago, Nostradamus predicted that Brian Sobolak would write  
> > on Sat Jan  3 14:57:03 2009:
> >
> >>
> >> I (heart) matplotlib.
> >> http://matplotlib.sourceforge.net/
> >>
> >
> > Is it better than R?
> >
> Yes. R graphs look odd to me, or at least dated.
> 
> Additionally, if you know python, it is pretty easy to learn. I was  
> never keen on learning the R "system".

R is a statistics package that 'also does' graphs. At its most basic
level the R graphics system has the same metaphor as that python
library, which is to say that of a plotting device.

The big advantage behind R is that atop the basic model people have
built a vast array of packages to produce a variety of useful data
visualizations. These range from the most traditional timeseries and
histogram plots to some of the latest ideas by Cleveland or
Tufte. 

I'm not really sure what Brian means by "dated." By default some of
the graphics packages (especially for traditional visualizations) like
to put a lot of chartjunk in, but that can be removed. And I've not
seen any other package where it's as easy to make a trellis graph as a
traditional scatterplot, or a mosaic plot as easily as a pie chart.

Because R is a stats package, many of the visualizations are designed
to complement statistical analysis, (some of the most used
visualizations are diagnostics such as Q-Q and density plots) and the
graphics packages frequently leverage the stats system to do advanced
things such as draw fit lines from non-linear regression.

Until recently it didn't seem like there were many resources available
that discussed R without discussing statistics. I took that as an
opportunity to motivate myself to start learning stats, and I think
that's been a very good decision. I've been seeing articles on the
Internet nowadays that *do* attempt to discuss R while going much
lighter on the math, so if you want to produce charts while avoiding
statistics, that's becoming easier to do in R.

-- 
Jordan Bettis -- Chicago Il.


More information about the ufo mailing list