# Recreate a polar chart

**URL:** <https://community.plotly.com/t/recreate-a-polar-chart/1232>\
**Category:** Plotly R\
**Created:** [June 8, 2016, 5:11am UTC](https://community.plotly.com/t/recreate-a-polar-chart/1232 "2016-06-08T05:11:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![1beb](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/1beb/32/315_2.png) [@1beb](https://community.plotly.com/u/1beb)\
**Post date:** [June 8, 2016, 5:11am UTC](https://community.plotly.com/t/recreate-a-polar-chart/1232/1 "2016-06-08T05:11:03Z")

</div>

I’m trying to create the following plot with either ggplotly() or plot\_ly. In both situations, I can’t seem to get it to match the original very well.

Full Disclosure: Cross posted [here](http://stackoverflow.com/questions/37670412/can-i-recreate-this-graphic-in-plotly)

Here’s the original:

 ![](https://us1.discourse-cdn.com/flex024/uploads/plot/original/1X/6cadb07914b88dbbdf0370b8e9d3b59de6e7c5a1.png)

Here’s the data:

d \<- structure(list(Year = c(“2015”, “2015”, “2015”, “2015”, “2015”,  
“2015”, “2015”, “2015”, “2015”, “2015”, “2015”, “2015”, “2015”,  
“2015”, “2015”, “2015”, “2015”, “2015”, “2015”, “2015”, “2015”,  
“2015”, “2015”, “2015”, “2016”, “2016”, “2016”, “2016”, “2016”,  
“2016”, “2016”, “2016”, “2016”, “2016”, “2016”, “2016”, “2016”,  
“2016”, “2016”, “2016”, “2016”, “2016”, “2016”, “2016”, “2016”,  
“2016”, “2016”, “2016”), Response = structure(c(1L, 2L, 3L, 4L,  
5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L,  
19L, 20L, 21L, 22L, 23L, 24L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L,  
9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L,  
22L, 23L, 24L), .Label = c(“Trustworthy”, “Supportive”, “Leading”,  
“Strong”, “Dependable”, “Consultative”, “Knowledgeable”, “Sensible”,  
“Intelligent”, “Consistent”, “Stable”, “Innovative”, “Aggressive”,  
“Conservative”, “Visionary”, “Arrogant”, “Professional”, “Responsive”,  
“Confident”, “Accessible”, “Timely”, “Focused”, “Niche”, “None”  
), class = “factor”), Proportion = c(0.54, 0.48, 0.33, 0.35,  
0.47, 0.3, 0.43, 0.29, 0.36, 0.38, 0.45, 0.32, 0.27, 0.22, 0.26,  
0.95, 0.57, 0.42, 0.38, 0.5, 0.31, 0.31, 0.12, 0.88, 0.55, 0.55,  
0.31, 0.4, 0.5, 0.34, 0.53, 0.3, 0.41, 0.41, 0.46, 0.34, 0.22,  
0.17, 0.28, 0.94, 0.62, 0.46, 0.41, 0.53, 0.34, 0.36, 0.1, 0.84  
), n = c(240L, 240L, 240L, 240L, 240L, 240L, 240L, 240L, 240L,  
240L, 240L, 240L, 240L, 240L, 240L, 240L, 240L, 240L, 240L, 240L,  
240L, 240L, 240L, 240L, 258L, 258L, 258L, 258L, 258L, 258L, 258L,  
258L, 258L, 258L, 258L, 258L, 258L, 258L, 258L, 258L, 258L, 258L,  
258L, 258L, 258L, 258L, 258L, 258L)), .Names = c(“Year”, “Response”,  
“Proportion”, “n”), row.names = c(NA, -48L), class = c(“tbl\_df”,  
“tbl”, “data.frame”))

Here’s what I’ve tried:

`plot_ly(d, r = Proportion, t = Response, x = Response, color = factor(Year), mode = "markers") %>% layout(margin = list(l=50,r=0,b=0,t=0,pad = 4), showlegend = TRUE)`

`p <- ggplot(d, aes(y = Proportion, x = Response, group = factor(Year), colour = factor(Year))) + coord_polar() + geom_point() + geom_path() ggploty(p)`

Nothing seems to work.

If this is simply not possible I’d like to know, otherwise, let’s see if you can do it!

---

<div class="post-metadata">

**Author:** ![jack](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/jack/32/11_2.png) [@jack](https://community.plotly.com/u/jack)\
**Post date:** [June 14, 2016, 4:01am UTC](https://community.plotly.com/t/recreate-a-polar-chart/1232/2 "2016-06-14T04:01:40Z")

</div>

A very nice answer for this was posted on stackoverflow:

> <https://stackoverflow.com/questions/37670412/can-i-recreate-this-polar-coordinate-spider-chart-in-plotly>

 ![](https://us1.discourse-cdn.com/flex024/uploads/plot/original/1X/a0a62997ef23ad7b79e2437454a07a613cee424b.png)

---

<div class="post-metadata">

**Author:** ![1beb](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/1beb/32/315_2.png) [@1beb](https://community.plotly.com/u/1beb)\
**Post date:** [June 14, 2016, 5:08am UTC](https://community.plotly.com/t/recreate-a-polar-chart/1232/3 "2016-06-14T05:08:03Z")

</div>

Yes, there are two great answers. dww used an interesting approach by putting it on a map projection. My approach was to recreate a circle using basic trig SOHCAHTOA. Both worked out very well.

Here’s a link to my version if you’re interested:

[https://plot.ly/~1beb/3/\_2015-vs-2016/](https://plot.ly/~1beb/3/_2015-vs-2016/)
