-
Notifications
You must be signed in to change notification settings - Fork 33
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
Feature request: Invert a ColorScheme (inverse of get
)
#10
Comments
Actually, after thinking about this a bit more, there are two separate parts to what I'm asking for...
But if there already exists the ability to invert a linspace as I described in 1, above, then maybe we could implement the behavior I described in 2 as another method of that function. This would mirror the way this package provides another method for Thanks! :) |
Hi! If you want to add your code to this package (via a PR if you like), I’d be delighted to help/assist in any way. This package could do with some more skilled contributors, I don’t understand what the code does myself sometimes ... :) |
:) Hi @cormullion! :) Thanks, I've opened a PR. Yeah, I'm looking forward to working together! I'm not sure if this is better discussed over there in the PR or here, but hopefully the README.ipynb demonstrates a bit about what I had in mind! :) And haha okay sure. I'm not sure if I'll be a great long-term maintainer; I don't spend too much time working in this space either, mostly i was just playing. But yeah I'm happy to help out if needed! |
Looks pretty good to me. The package will need an overhaul in a few months when everything breaks on the road to v0.7/v1.0, so I think we should merge this and see how it works/what needs revising. |
Hi! I came across the need to convert a heatmap image to an Array of continuous values, and in the process discovered this cool package. ColorSchemes is exactly what I wanted to represent with code the continuous semantics humans put on a heatmap. Thanks!
But in my case, I already had pixels, and I wanted to find out where each pixel lies on the this continuous ColorScheme, rather than the other way around (the functionality provided by
get(cscheme, x)
.I've done this before in JavaScript via
d3
to create a map legend you can mouse over:So anyway, this is a Feature Request to be able to do the same thing with ColorScheme.jl! 😸
I should've checked to see if this functionality already exists somewhere else, or if it's even a thing people would want, but I got carried away and I wrote it myself... I put the functionality in this package here:
https://github.com/NHDaly/ColorSchemesInvert.jl/blob/master/README.ipynb
If this is something people think makes sense, I can open a pull request to merge that functionality into this package. What do you think?
The text was updated successfully, but these errors were encountered: