New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
windrose plot sectors show straight line instead of curved ones #137
Comments
The workaround for this issue (found by my colleague at work) is as follows: fig = plt.figure()
rect = [0.1, 0.1, 0.8, 0.8]
hist_ax = plt.Axes(fig,rect)
hist_ax.bar(np.array([1]), np.array([1]))
# only after creating the dummy axes above, the windrose will plot curved sectors!
ax = WindroseAxes.from_ax()
ax.bar(wd, ws, normed=True, opening=0.8, edgecolor='white')
ax.set_legend() |
Closing this as answered. Please re-open if you disagree. |
Mhm, I'm running into the same issue while writing tests using a baseline image and comparing results to it. I got random fails and was wondering why this was the case. Turns out if the tests runs first, the sectors will have square ends, if it runs after any other test that involves plotting, it succeeds. So for some reason we need to run some plotting before, so it gets the rounded results -- I have no idea how to debug this though. Something is different with either the object or the global state. Since this causes inconsistent behavior, I'd consider this a bug we should address or at least find out what's going on... I'll dig deeper into this and let you know if I come across anything... |
Following the minimal example of https://windrose.readthedocs.io/en/latest/usage.html#script-example
I obtain a windrose plot which shows a straight line for each sector (instead of a curved one).
Same happens for more elaborate examples.
However, following the sample script for a polar bar chart from matplotlib:
https://matplotlib.org/3.2.1/gallery/pie_and_polar_charts/polar_bar.html#sphx-glr-gallery-pie-and-polar-charts-polar-bar-py
I do get the rounded/curved sectors.
I am using:
windrose 1.6.7 pypi_0 pypi
python 3.8.5 h425cb1d_1_cpython conda-forge
matplotlib-base 3.3.0 py38h91b0d89_1 conda-forge
Any ideas why this is happening?
Many thanks!
The text was updated successfully, but these errors were encountered: