-
Notifications
You must be signed in to change notification settings - Fork 9
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
Wind/wave rose plot #240
Wind/wave rose plot #240
Conversation
Maybe add an example notebook on how it would work with Modelskill? |
Great idea - would you have some short sample data which is a bit more interesting than @ecomodeller example above? |
You suggesting @ecomodeller data is not interesting? omg. |
Thx @daniel-caichac-DHI for the data. Now on to fixing the legend... I would prefer a single legend with two columns, greyscale and color, instead of two separate legends with identical interval, thoughts? |
I just copied the |
Would it not be better to call the function |
Could be called just |
Here is a screenshot from an interactive example using Shiny It seems like the size of the Calm circle is a bit too small to fit the text. 🤔 |
If I remember correctly there is a *kwarg to resize the calm size maybe change the default? |
I think the type of plot is commonly referred to as a "Wind rose" since it is most often used for wind, even though it can be applied to waves and currents as well. I asked ChatGPT:
|
ChatGPT: "'Wind Rose' is one of the most commonly used synonyms for a rose diagram" - I guess that is a case for "rose diagram" 😆 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fantastic work - looks really good.
I have a few suggestions:
- I think it would be nice if the data could just be array like. It seems that you need to explicitly give it a numpy array (at least in the notebook). Why not accept anything that could be made numpy array?
- It misses a "figsize" argument - we usually have that and I was missing it when I tested
- watermark doesn't seem to work (or maybe I just misunderstand what it does)?
- maybe rename the argument "resize_calm" to "calm_size" so it looks more similar than the other calm arguments.
|
||
|
||
def test_wind_rose_image_identical(wave_data_model_obs, tmp_path): | ||
# TODO this test seems fragile, since it relies pixel by pixel comparison of images |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree.
I have so far not found a way to compare the resulting plots.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code supplied by @daniel-caichac-DHI