Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Plots using polar coordinates are certainly underused--some would say with good reason. I think the situations which justify their use are not common; I also think that when those situations arise, polar plots can reveal patterns in data that linear plots cannot. </p> <p>I think that's because sometimes your data is <em>inherently</em> polar rather than linear--eg, it is cyclical (x-coordinates representing times during 24-hour day over multiple days), or the data were previously mapped onto a polar feature space.</p> <p>Here's an example. This plot shows a Website's mean traffic volume by hour. Notice the two spikes at 10 pm and at 1 am. For the Site's network engineers, those are significant; it's also significant that they occur near each other other (just <strong>two</strong> hours apart). But if you plot the same data on a traditional coordinate system, this pattern would be completely concealed--plotted linearly, these two spikes would be <strong>20</strong> hours apart, which they are, though they are also just two hours apart on consecutive days. The polar chart above shows this in a parsimonious and intuitive way (a legend isn't necessary).</p> <p><img src="https://i.stack.imgur.com/FS6Pi.png" alt="Polar chart showing site traffic, with peaks at hours 1 and 22"></p> <p>There are two ways (that I'm aware of) to create plots like this using R (I created the plot above w/ R). One is to code your own function in either the base or grid graphic systems. They other way, which is easier, is to use the <strong>circular package</strong>. The function you would use is '<strong>rose.diag</strong>':</p> <pre><code>data = c(35, 78, 34, 25, 21, 17, 22, 19, 25, 18, 25, 21, 16, 20, 26, 19, 24, 18, 23, 25, 24, 25, 71, 27) three_palettes = c(brewer.pal(12, "Set3"), brewer.pal(8, "Accent"), brewer.pal(9, "Set1")) rose.diag(data, bins=24, main="Daily Site Traffic by Hour", col=three_palettes) </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload