Skip to content Skip to sidebar Skip to footer

Set Step Size Polar Plot Matplotlib Python

Currently i'm making a polar plot in matplotlib. Unfortionaly the step size is 10, like shown below. How can i change the step size to 6 instead of 10? The min and max value need

Solution 1:

One way to approach this would be:

import numpy as np
#retrieve automatically generated axis values
axmin = ax.get_rmin()
axmax = ax.get_rmax()
step = 6
#generate new ticklist with desired step size
axlist = np.arange(axmin, axmax + step, step)
#set new ticks
ax.set_rticks(axlist) 

Output

enter image description here

Post a Comment for "Set Step Size Polar Plot Matplotlib Python"