Skip to content

Instantly share code, notes, and snippets.

@phobson
Last active December 5, 2024 15:43
Show Gist options
  • Save phobson/41b41bdd157a2bcf6e14 to your computer and use it in GitHub Desktop.
Save phobson/41b41bdd157a2bcf6e14 to your computer and use it in GitHub Desktop.
Making a wind rose in pandas/matplotlib
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fllamorim
Copy link

Hi, thank you very much for your code.

Is there a way to centralize the bins with the grid lines? In my example, they start from the class limits, as you can see in the image.
I could not identify which parameter is responsible for this.
Please, find the dataset used for the plot.
wind_rose_example

Best regards,

Felipe Amorim

@phobson
Copy link
Author

phobson commented Oct 24, 2024

@fllamorim Hard to guess from what you've provided. My best guess is that you need re-define your bins to actually be centered. In my example, the bins are numerically and graphically centered. If you define the bins correctly, you shouldn't need to tweak any graphical parameters.

@treymaddaleno
Copy link

Just wanted to say thanks - this was very useful for me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment