-
Notifications
You must be signed in to change notification settings - Fork 23
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
Plot unidirectional spectrum #117
Comments
This would be nice @ryancoe. The plotting code in wavespectra is all defined in the plot.py module which is just a wrapper to modify the native plotting capability from xarray. We could implement something there. I won't have much time to look into this soon but if you are keen to have a crack please go ahead - happy to help out if you have questions on how that plugin works |
Sounds good. I did take a look at |
@ryancoe I started to have a crack at this but it is a bit messy because the plot accessor in wavespectra is all about allowing polar-type plots so it really relies on directions being there. That being said, 1D spectra will plot just fine the way you suggested using xarray's directly, for example:
|
For cases in which the there is 1 or fewer dimensions (
len(da.spec.dir) <= 1
), it'd be nice if callingda.plot()
would automatically plot spectral density vs. frequency instead of erroring out. Currently, you can get a standard plot straight fromxarray
by callingda.spec.oned().plot()
, but it'd be nice if the axis labeling, etc. were provided bywavespectra
. Any thoughts?Current error message
<\details>
The text was updated successfully, but these errors were encountered: