[R] It This data viz possible in R?
baptiste auguie
baptiste.auguie at googlemail.com
Wed Apr 7 16:20:58 CEST 2010
Hi,
Barry suggested a way to place the text labels; I would like to point
out the grid.curve() function that might help in connecting the labels
with nice-looking curves. I don't know of a base graphics equivalent
(xspline() might come close) so it might be best to opt for Grid.
HTH,
baptiste
On 7 April 2010 15:46, Barry Rowlingson <b.rowlingson at lancaster.ac.uk> wrote:
> On Wed, Apr 7, 2010 at 2:28 PM, Brock Tibert <btibert3 at yahoo.com> wrote:
>> Hi All,
>>
>> I am new to R, but it has been a lot of fun learning as I go and have been blow away by what it can do. Came across this example and wanted to see if ggplot2 or some other visualization package could make this sort of graphic.
>>
>> http://www.visualcomplexity.com/vc/project.cfm?id=717&utm_source=feedburner&utm_medium=feed&utm_campaign=Feed:+visualcomplexity+(visualcomplexity.com)&utm_content=Google+Reader
>>
>> Thanks in advance!
>
> Not quite out-of-the box, but you can draw text with the text()
> function setting the angle with the 'srt' parameter, and you can draw
> lines using 'lines'. You can compute angles using 'pi'. You'll need a
> bit of trig to work out the angle that the lines start and end at.
> That's about all you need to know.
>
> Some of the subtleties of the typesetting of that specific piece may
> be tricky, but it's easy to write a function that takes a vector of
> strings and an adjacency matrix and plots something like it.
>
> Give R-help another hour and I reckon something will turn up. Not
> from me, I'm watching the IPL cricket.
>
> Barry
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
More information about the R-help
mailing list