Draw radar chart with R

A radar chart is a graphical method of displaying multivariate data in the form of a two-dimensional chart of three or more quantitative variables represented on axes starting from the same point. The relative position and angle of the axes is typically uninformative. (from wikipedia)

It’s useful for visualize multi parameters in drug discovery.
For example, visualize compound profile, Lipinsky rule, ADMET profile etc….
Yesterday, I found new library to make radar chart in R language named ggradar.
https://github.com/ricardo-bion/ggradar
You know, ggradar is library based on ggplot2. It sounds nice! I used ggradar.
I wrote simple example using iris dataset.
I used dpylr for data preparation. ( dplyr is cool library !!!! )

library(ggradar);
library(scales);
suppressMessages( library(dplyr) );
irisdata <- iris %>% 
            group_by( Species ) %>%
            mutate_each(funs(rescale)) %>%
            summarise( mean(Sepal.Length), mean(Sepal.Width), mean( Petal.Length ), mean( Petal.Width )  )
ggradar( irisdata )

Then I got following image.
rplot

ggradar can set many option, font color, size and line size etc.
But now legend text size can not change. The issue is submitted github.

Ggradar is early project, but useful and attractive library for me.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s