Plotting level plot in R -


i have 12 variables, m1, m2, ..., m12, compute statistic x.

 df = data.frame(model = paste("m", 1:28, sep = ""), x = runif(28, 1, 1.05))  levels = seq(0.8, 1.2, 0.05) 

i plot data follows:

enter image description here

each circle (contour) represents level of statistic "x". 3 blue lines represent 3 different scenarios. dataframe included in example represents 1 scenario. blue line join values of models m1 m28 specific scenario.

is there tool in r allow such plot? tried contour() library(mass) contours not drawn perfect circles.

any appreciated. thanks!

here ggplot solution:

library(ggplot2) ggplot(data=df, aes(x=model, y=x, group=1)) +    geom_line() + coord_polar() +    scale_y_continuous(limits=range(levels), breaks=levels, labels=levels) 

enter image description here

note little confusing because of names in data frame. x y variable here, , model real x, graph scale label seems odd.

edit: had set factor levels model in data frame plot in correct order.


Comments

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -