Polygon radar plot instead of circular?

Hi everyone,

I’m trying to construct a radar plot for 5 variables. I’ve found the example code (radar_chart.py) for doing this with matplotlib but I’m having trouble adjusting one aspect of the rendering. That sample file produces radar plots with circular frames and ticks (see http://wineinger.me/plotting/radar_chart1.png). That sample code does seem to have an option to use a polygon frame rather than a circle (the default), but this doesn’t seem to do much except erase part of the outer tick lines (http://wineinger.me/plotting/polygon.png vs http://wineinger.me/plotting/circle.png). Plus, I’m looking for the tick lines to parallel the frame, so having a polygon frame with circular ticks would not be useful to me.

Here is an example of what I’d like to produce: http://www.corda.com/docsource/doc7/Manuals/project_graphics/design_graphs_radar_transparency.gif. Can anyone provide some sample code to get me started or at least some direction on how to accomplish this? I’m new to matplotlib though I do have a fair bit of python experience.

thanks!

Jay

Hi everyone,

I’m trying to construct a radar plot for 5 variables. I’ve found the example code (radar_chart.py) for doing this with matplotlib but I’m having trouble adjusting one aspect of the rendering. That sample file produces radar plots with circular frames and ticks (see http://wineinger.me/plotting/radar_chart1.png). That sample code does seem to have an option to use a polygon frame rather than a circle (the default), but this doesn’t seem to do much except erase part of the outer tick lines (http://wineinger.me/plotting/polygon.png vs http://wineinger.me/plotting/circle.png).

Originally, this example did produce the polygon frame correctly. Improvements to matplotlib have, however, broken this example. If you plot this on a non-white background, you’ll see that there is indeed a polygon patch for the axes. Nevertheless the border (i.e. “spine”) of the plot is circular because of improvements that separated the spine from the patch. The example code only overrides PolarAxes._gen_axes_patch, but should also override PolarAxes._gen_axes_spines to fix this issue. Unfortunately, I don’t have time to work on this.

Plus, I’m looking for the tick lines to parallel the frame, so having a polygon frame with circular ticks would not be useful to me.

I thought the grid was correctly rendered as polygons instead of circles (when choosing a polygon frame). I don’t, however, see anything in the example code to change the grid lines, so my memory might be wrong.

Sorry I couldn’t be more help.
-Tony

···

On Wed, Aug 10, 2011 at 1:36 PM, Jay Wineinger <jay.wineinger@…287…> wrote: