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 gray parameter to convert RGB to grayscale and plot grayscale images #19

Closed
SarthakJariwala opened this issue Aug 11, 2020 · 0 comments · Fixed by #25
Closed

Add gray parameter to convert RGB to grayscale and plot grayscale images #19

SarthakJariwala opened this issue Aug 11, 2020 · 0 comments · Fixed by #25
Assignees
Labels
enhancement New feature or request

Comments

@SarthakJariwala
Copy link
Owner

Implementation

# If data is a RGB image and gray is True, 
# convert to rgb to grayscale internally and plot image using a grayscle colormap
>>> isns.imgplot(data, gray=True)

# If data has only 2 dimensions and gray is True, plot image using grayscale colormap
>>> isns.imgplot(data, gray=True)

# If gray is True and cmap is not None, use cmap instead of grayscale colormap
# If data is RGB, conversion to grayscale will still be performed
>>> isns.imgplot(data, gray=True, cmap="deep")
@SarthakJariwala SarthakJariwala added the enhancement New feature or request label Aug 11, 2020
@SarthakJariwala SarthakJariwala self-assigned this Aug 11, 2020
@SarthakJariwala SarthakJariwala linked a pull request Aug 15, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant