-
Notifications
You must be signed in to change notification settings - Fork 342
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
Add "at" keyword for imshow and other enhancements #1430
Conversation
@vaga3461, @ethan-pierce: I noticed you used the I added an from landlab.plot import imshow_grid
imshow_grid(grid, ...) you can just do, grid.imshow(...) I've also made the syntax (I think) a little cleaner and more like other parts of landlab. Instead of, imshow_grid(grid, "node", "topographic__elevation") you can do, grid.imshow("topographic__elevation", at="node") If you don't provide an grid.imshow(values) # values is a array of values, doesn't have to be a field
grid.imshow("topographic__elevation"). # looks for the named field first at nodes, and then at cells |
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.
these changes look good to me, I like that you've made the syntax more similar to other functions. Thanks!
Thanks @vaga3461! I'll update the usages of imshow_grid in the notebooks and then merge. |
This pull request addresses #1424 but adding an at keyword to imshow when used as a ModelGrid method. There are also a couple other changes:
grid.imshow(values)
andgrid.imshow("topographic__elevation")
.imshow("node", "topographic__elevation")