How to create a custom dynamic colormap?

조회 수: 7 (최근 30일)
Patrik Ek
Patrik Ek 2013년 10월 17일
댓글: Giuseppe 2017년 3월 10일
Hi,
I have been wondering about how to create a custom colormap, with a dynamic range similar to the default colormaps in MATLAB. The call to the colorbar will be something like,
customColormap = getCustomColormap(nColors);
It is possible that there is no clear solution to this problems, but it would be great if anyone have an idea to how to proceed.
Best Regards Patrik

채택된 답변

Simon
Simon 2013년 10월 17일
Hi!
You can use the command "colormap" to create color maps. The built-in colormaps can be scaled dynamically, like
colormap(jet(nColors))
You can as well build your own color maps. A color map is a m-by-3 matrix of real numbers between 0.0 and 1.0, specifying RGB values.
  댓글 수: 4
Patrik Ek
Patrik Ek 2013년 11월 15일
Thank you this colormap editor is amazing. For the automatic rescaling I guess i gets more complicated the more advanced colormap, but thank you for giving me a start.
Giuseppe
Giuseppe 2017년 3월 10일
A small correction:
C_HSV = [C_HSV_interp(:), repmat(C_HSV( 1, 2:3), n, 1)];

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Colormaps에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by