-
Notifications
You must be signed in to change notification settings - Fork 0
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
triheatmap #265
triheatmap #265
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Ignore the |
I am thinking about this more and I am not sur if the list of |
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.
Could vmin and vmax be automatically added by finding min/max values from da when user don't add them to plot_kw?
Thanks Juliette, looks great!
src/figanos/matplotlib/plot.py
Outdated
|
||
def triheatmap( | ||
data: xr.DataArray | xr.Dataset, | ||
dim: str, |
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.
Could use hue instead of dim to be similar to xarray plot: https://docs.xarray.dev/en/stable/user-guide/plotting.html
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.
well hue means color, I'm not sure it's adapted here has the triangles could be the same colors. how about tri_dim
or triangle
?
---------- | ||
data : DataArray or Dataset | ||
Input data do plot. | ||
ax : matplotlib axis, optional |
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.
missing 'dim'
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.
oups!
src/figanos/matplotlib/plot.py
Outdated
f"The length of the dimensiondim ({dim},{len(d)}) should be either 2 or 4. It represents the number of triangles." | ||
) | ||
|
||
plt.xlabel(other_dims[0]) |
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.
Could xlabel or ylabel also be linked to use_attrs?
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.
yes!
Pull Request Checklist:
number
) and pull request (:pull:number
) has been added.What kind of change does this PR introduce?
Does this PR introduce a breaking change?
no
Other information: