9

I am using matplotlib to create polar plots to represent Rose Diagrams. Right now the plot is getting created perfectly. I want to replace the angles being displayed on the axis with direction names: N for 0 degrees, W for 90 degrees, S for 180 degrees and E for 270 degrees.

The current rose diagram looks like the following: enter image description here

Note: I have tried with windrose but this output is more appropriate for my purpose. Hence a good way of assigning custom labels to the axes will be very helpful.

The python version I am using is 2.6 with matplotlib version 1.2.0

DotPi
  • 3,735
  • 5
  • 31
  • 48

1 Answers1

15

Assuming that you have an axes object ax you can do simply do something like this

ax.set_xticklabels(['N', '', 'W', '', 'S', '', 'E', ''])

or get some inspiration by this old example

Francesco Montesano
  • 8,187
  • 2
  • 41
  • 64