Add a flag to show_geometry that allows for disabling the call to plt.show() - #2195
Conversation
….show() (TomographicImaging#2194) * This change was requested by the Mantid Imaging project (https://github.com/mantidproject/mantidimaging) * Add the `show` flag to the `show_geometry` class with a default value of True * Update `show_geometry` docstring * Changelog --------- Signed-off-by: Hussam Alhassan <[email protected]>
|
Please let me know if I can improve the code, commit message, or issue/PR contents |
hrobarts
left a comment
There was a problem hiding this comment.
Hi Hussam, thank you for your contribution this looks great. Would you be able to add a description of the new argument to the show_geometry docstring?
|
Hi Hannah, do you mean adding some more detail to the "Show Matplotlib figure window, default=True" part? We could write "Controls whether Matplotlib spawns a visualiser window by running show() on the generated plot", does that sound ok? If so I can update the PR |
|
Hi Hussam, ah sorry I missed that you'd already added to the docstring! I think your existing text is good, it's clear to me what you mean. |
Signed-off-by: Laura Murgatroyd <[email protected]>
|
Hi, I've resolved the conflicts. I'm going to add you as a CIL contributor, and then we'll be ready to merge. |
Signed-off-by: Laura Murgatroyd <[email protected]>
Signed-off-by: Laura Murgatroyd <[email protected]>
Signed-off-by: Laura Murgatroyd <[email protected]>
Signed-off-by: Laura Murgatroyd <[email protected]>
|
Sorry I got a little mixed up with the docstring but resolved it now |
|
Thank you for the review! |
Description
This change was requested by the Mantid Imaging project (https://github.com/mantidproject/mantidimaging)
The following changes have been made:
showflag to theshow_geometryclass with a default value of Trueplt.show()conditional on theshowflagshow_geometrydocstringExample Usage
Creating an instance of
show_geometry(show=False)no longer spawns the Matplotlib figure window.Checklist