Skip to content
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 examples to scipy.ndimage.filters #6253

Merged
merged 1 commit into from
Jun 13, 2016
Merged

Add examples to scipy.ndimage.filters #6253

merged 1 commit into from
Jun 13, 2016

Conversation

MartinThoma
Copy link
Contributor

No description provided.


Examples
--------
>>> import scipy.misc
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Import style: from scipy import ndimage, misc

@rgommers
Copy link
Member

And a minor thing for next commits: please use the prefixes given in http://docs.scipy.org/doc/numpy-dev/dev/gitwash/development_workflow.html#writing-the-commit-message

@rgommers
Copy link
Member

Overall +1, nice to have some examples for ndimage.

@rgommers rgommers added enhancement A new feature or improvement scipy.ndimage Documentation Issues related to the SciPy documentation. Also check https://github.com/scipy/scipy.org labels Jun 12, 2016
@MartinThoma
Copy link
Contributor Author

Thank you for pointing me to the commit prefixes; I adjusted my commit message (and changed the other things you mentioned).

@rgommers
Copy link
Member

Code looks good now, but the example is a pretty bad green: https://circle-artifacts.com/gh/scipy/scipy/145/artifacts/0/home/ubuntu/scipy/doc/build/html-scipyorg/generated/scipy.ndimage.prewitt.html#scipy.ndimage.prewitt

How about adding plt.gray() before plt.imshow to show the filtered result in grayscale? Another colormap is fine with me too, but the current default is not great.

@rgommers
Copy link
Member

That looks much better. One last issue - the second figure for gaussian_laplace doesn't show up: https://circle-artifacts.com/gh/scipy/scipy/146/artifacts/0/home/ubuntu/scipy/doc/build/html-scipyorg/generated/scipy.ndimage.gaussian_laplace.html#scipy.ndimage.gaussian_laplace

If you insert a plt.figure() above the last 2 lines it probably will. Then I think you'll get 2 figures below each other. Better would be to have them next to each other - this can be done by creating 2 axes in a figure, like:

fig = plt.figure()
plt.gray()
ax1 = fig.add_subplot(121)
ax1.imshow(...)
ax2 = fig.add_subplot(122)
ax2.imshow(...)

@rgommers
Copy link
Member

Much better. In it goes. Thanks @MartinThoma!

@rgommers rgommers merged commit 3b11601 into scipy:master Jun 13, 2016
@rgommers rgommers added this to the 0.18.0 milestone Jun 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Issues related to the SciPy documentation. Also check https://github.com/scipy/scipy.org enhancement A new feature or improvement scipy.ndimage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants