-
Notifications
You must be signed in to change notification settings - Fork 213
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
Automatic labels and titles to plots based on xarray metadata #1412
Comments
The idea sounds interesting, but I think it's challenging to implement it in PyGMT. The main problem is, PyGMT is "stateless". When calling However, I find the automatic labels/annotations/titles feature is still very appealing when users want to quickly view a DataArray. In #2372, I've added a simple Here is an example using the feature implemented in PR #2372:
Currently, it shows an image like this (which definitely can be greatly improved): For comparison, to view a DataArray in matplotlib:
|
Description of the desired feature
Originally posted by @leouieda as a comment about
xarray
integration at https://hackmd.io/@pygmt/SkVmX_20d:My interpretation of this 'feature request' is that
grdimage
could automatically add x-axis and y-axis labels/annotations to the plot, and include a title about the z-variable name (without the user setting it explicitly). Something based on pydata/xarray#519.The auto-labels/titles currently comes for free in
xarray
through thexarray.DataArray.plot.imshow()
function. We could inspect the source code at https://github.com/pydata/xarray/blob/v0.19.0/xarray/plot/plot.py#L244 to see how this can be implemented in PyGMT.Are you willing to help implement and maintain this feature? Long term stuff for PyGMT > v0.6.0
The text was updated successfully, but these errors were encountered: