-
-
Notifications
You must be signed in to change notification settings - Fork 307
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
r.stats.zonal: Add screenshots to manual #2577
Conversation
Add three screenshots to illustrate module functionality
I think the best approach to HTML here is, don't use it and use image instead. No need to click on individual images, the whole image is enough. The code to create the exact images is missing in the PR. My latest attempt for a better approach to this is a combination of a notebook, d.explanation.plot addon, and ImageMagick which is what I used in d207d49. The d.explanation.plot is optional, but I find it useful. The notebook resolves the reproducibility and the combination to one image which would be a shell script and possibly an SVG. d.explanation.plot does not solve the text well enough, but perhaps okay in a combination with a figure caption in HTML. I would be curious of what everyone things about the notebook-based approach to images in HTML documentation. |
Good hint, I had forgotten the existance of the d.explanation.plot addon.
Unfortunately the numbers are no longer plotted (ignore the red lines): Seems to be a new issue in |
Check the Known Issues section in the documentation. Perhaps it is one of them. You are using GUI. I used a notebook with grass.jupyter.Map. |
The new version of d.explanation.plot is in. There is couple of notebooks with examples in the repo since d207d49, for example raster/r.series/graphics_for_description.ipynb. |
Please, try the notebook and email it to me if it does not work. See the Notes section. There are some known issues with various combinations of displays and there are perhaps some unknown issues as well. |
OK, I have now written a similar jupyter notebook (attached) to generate the desired screenshot: How to use (for those here not too familiar with it):
graphics_for_description.ipynb.gz @wenzeslaus Almost successful now but the size leads to this limit due to spatial resolution leads to:
Maybe some trick could be added to |
This is really an intentional d.rast.num feature. Resolution and extent are based on user settings, i.e., which cells do you want to see? d.explanation.plot just uses that as is. So, if you want to revise behavior, and I agree it is a good idea, let's start with d.rast.num. On the other hand, if you don't want to show the numbers, then d.explanation.plot needs to be changed. |
…s: bugfix for labeling
Fair enough. I have now zoomed to a small spatial subset (5 x 5 pixels) which is anyway better to visualize: PR incl. new jupyter notebook updated accordingly. Thanks for convincing me to switch to this approach, I quite like it. While at it, I have fixed a labeling error in the |
The idea for d.explanation.plot was 3x3 or 5x5 rasters which you can conveniently compute by hand.
I'm glad. My last updates to d.explanation.plot really made it much more usable. However, what makes it really work well is the notebook, i.e., grass.jupyter. Thanks @chaedri!
Thanks! |
OT here: Perhaps worth a user warning in d.explanation.plot when one tries to feed it with (way) more pixels. |
Isn't the message from d.rast.num sufficient? Perhaps that needs to be improved in some way. |
Yeah, ok. And it would be for a different PR anyway. I'd merge this PR then. |
* r.stats.zonal manual: add figure to illustrate module functionality along with jupyter notebook * r.series: bugfix for labeling
Add three screenshots to illustrate module functionality (screenshots are clickable) to
https://grass.osgeo.org/grass83/manuals/r.stats.zonal.html#example
TODO: possibly improve HTML code