Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

My only question mark from this is matplotlib. I tried it five or six years ago and it seemed clunky to use and install. And worst I couldn't seem to just throw up a plot, I recall there being a lot of settings required. And the plots didn't look good by default you had to fool with fonts, font sizes, etc.

Does anyone know if it's improved a lot since then? Otherwise I'm not seeing how it could hold a candle to R's plotting abilities and ease of use.



R may still have an advantage when it comes to plotting simplicity.

On the Python side, matplotlib is still a bit of a pain, but has improved.

Also look at ggplot.py (alpha-ish?) and Bokeh from ContinuumIO


There is also Seaborn: http://stanford.edu/~mwaskom/software/seaborn/index.html

and Vincent: https://github.com/wrobstory/vincent

Also the code examples given on AstroML to work well for figuring out how to make publication quality figures in Matplotlib: http://www.astroml.org/book_figures/


What is simpler than this?

  x = arange(0, 2*pi, 1e-2)
  plot(x, sin(x))


For things that only need a one or two line command set, Python and R are probably similar. Once things get a bit more complex, matplotlib may not seem as "friendly" to those used to ggplot.

But this about perspective. Coming from a Python background, I would rather stay in Python and work with matplotlib, seaborn, or even ggplot.py, than try to work my data management code into the R model.


This:

  set xrange [0:2*pi]
  plot sin(x)
EDIT: Yes, this is gnuplot, not R.


However, that is gnuplot (I think), not R code. I have not been clear with my question, since I was talking about this parent comment:

R may still have an advantage when it comes to plotting simplicity


Yep, ggplot is the one thing that I keep coming back to R for, plus the odd statistical model I can't find in statsmodels - which is rarer and rarer.

One of the many awesome features of IPython - the interactive python shell and notebook, is that you can call code blocks in R just by prefacing with %%R. So my plotting habits are usually first to try the python port of ggplot, and if that can't handle my situation I just jump into R without having to switch windows or do any complicated data transfer.

It's worth mentioning that matplotlib is designed to mimic Matlab's plotting API, so for people coming from Matlab there's very little change, plus there's all the benefits of the other plotting libraries others have mentioned.


You could try my veusz plotting GUI / plotting package as an alternative to matplotlib: http://home.gna.org/veusz/ I think the output looks nicer than matplotlib by default, and you can have a nice GUI and scriptable interface.


I vastly prefer R's plotting capabilities, even if I don't generally use ggplot2.




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

Search: