Add colormap option to set_data + update jet implementation.#1372
Add colormap option to set_data + update jet implementation.#1372
Conversation
fc36853 to
44f58a1
Compare
|
I'm also tempted to simply mark jet as deprecated and add the turbo colormap: |
|
Yeah. I like this idea, too.
…On Sun, Dec 1, 2019, 2:40 PM Jérémie Dumas ***@***.***> wrote:
I'm also tempted to simply mark jet as deprecated and add the *turbo*
colormap:
https://ai.googleblog.com/2019/08/turbo-improved-rainbow-colormap-for.html
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1372?email_source=notifications&email_token=AARDJGK3J75MDODWAZ6GCVTQWQHJXA5CNFSM4JTNIIC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFRTMUA#issuecomment-560150096>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AARDJGJPU5DEZGJY67EZUELQWQHJXANCNFSM4JTNIICQ>
.
|
include/igl/opengl/ViewerData.cpp
Outdated
| } | ||
|
|
||
| IGL_INLINE void igl::opengl::ViewerData::set_data( const Eigen::VectorXd & D) | ||
| IGL_INLINE void igl::opengl::ViewerData::set_data( const Eigen::VectorXd & D, igl::ColorMapType cmap) |
There was a problem hiding this comment.
Let's keep a set_data(D) that uses a default colormap.
We should also use const for input params.
There was a problem hiding this comment.
nvm about default. Found the default it in the .h
|
Btw I'm also questioning if we should make Parula our default colormap. Matplotlib developed Viridis and co. because Parula is copyrighted by Matworks. Do we really want to make it our default colormap, or should we stick with Viridis? |
|
that's fine with me.
… |
|
That's fine meaning ok to switch to viridis, or ok to keep parula? |
|
sorry I was unclear. Switching to Viridis is fine. As long as it's close
enough looking to Parula that I don't need to remake all of the new
tutorial figures...
… |
|
fwiw, I much more impressed with the colorbrewer colormaps than matlab's or
matplotlib's. Maybe we should support those and use one as a default.
… |
|
You mean this website? Their colormaps are defined here. Should be easy to integrate into libigl. EDIT: Also seems to be available in this CSV file. |
|
I've switched to Viridis by default. Should be close enough to Parula to not perturb the tutorials. I'll merge once the build passes. We can add the colorbrew palette in a separate PR. Given that these are discrete colormaps, we can add a function to directly return the colorbar given the number of steps required by the user. |


Check all that apply (change to
[x])