polar axes labels error with small radial range #680
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
<
2E75
span class="js-validation-on-right-blob">You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey there. When you run this example: http://matplotlib.sourceforge.net/examples/pylab_examples/polar_demo.html
and replace "ax.set_rmax(3.0)" with "ax.set_rmin(2.91); ax.set_rmax(3.01)" the r-axis labels move off of the axis.
Full example below (with the figsize changed to show where the labels go:
import matplotlib
import numpy as np
from matplotlib.pyplot import figure, show, rc, grid
radar green, solid grid lines
rc('grid', color='#316931', linewidth=1, linestyle='-')
rc('xtick', labelsize=15)
rc('ytick', labelsize=15)
force square figure and square axes looks better for polar, IMO
width, height = matplotlib.rcParams['figure.figsize']
size = min(width, height)
make a square figure
fig = figure(figsize=(6, 4))
ax = fig.add_axes([0.1, 0.1, 0.8, 0.8], polar=True, axisbg='#d5de9c')
r = np.arange(0, 3.0, 0.01)
theta = 2_np.pi_r
ax.plot(theta, r, color='#ee8d18', lw=3)
ax.set_rmin(2.91)
ax.set_rmax(3.01)
grid(True)
ax.set_title("And there was much rejoicing!", fontsize=20)
show()