sirrice / pygg

ggplot2 syntax in python. Actually wrapper around Wickham's ggplot2 in R
MIT License
73 stars 9 forks source link

Generalize to_r function to convert more python expressions to R #6

Closed depristo closed 9 years ago

depristo commented 9 years ago

Right now to_r doesn't understand basic python types like lists and dictionaries and it would be more nature to use those data structures when invoking ggplot via pygg in some function calls. to_r should be generalized to recursively convert common python data structures to reasonable R equivalents.

For example, right you can you have to say:

    p += pygg.scale_y_continuous(limits="c(0, 1)")

but it would be more natural to be able to say this as:

    p += pygg.scale_y_continuous(limits=[0, 1])