필터 지우기
필터 지우기

Can I put multiple colormaps on one figure?

조회 수: 8 (최근 30일)
Anne-Marie
Anne-Marie 2023년 7월 31일
편집: dpb 2023년 7월 31일
I have an image with 45 grids on it with multiple data points of 5 different classes/colors. I want to assign each grid its own individual colormap so that I can analyze it on a larger scale. I was wondering if this was possible or should I make a colormap for the whole thing and put the grids on top of that? I attached a picture for some visual clarity. Any tips or suggestions are appreciated and thank you!!
  댓글 수: 2
DGM
DGM 2023년 7월 31일
편집: DGM 2023년 7월 31일
To be more specific, I assume you have one image, but you have 45 groups of datapoints, and it's the datapoints you want to use with a colormap. Is that correct?
If so, what tools are you using to draw the image and datapoints. If they're stuff from the mapping toolbox, the answer might be different.
If you're trying to do something different, feel free to clarify.
Anne-Marie
Anne-Marie 2023년 7월 31일
Yes, that's correct! I made percentages out of it to make it like that as well. To draw the image and datapoints, I'm using the mapping toolbox so things such as shaperead, geoplot, and plotting them on a geographic axes.

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

답변 (2개)

dpb
dpb 2023년 7월 31일
편집: dpb 2023년 7월 31일
colormap doc says...
targetTarget
Figure object | Axes object |PolarAxes object | GeographicAxes object | standalone visualization
Target, specified as one of these values:
  • Figure object. The figure colormap affects plots for all axes within the figure.
  • Axes object, PolarAxes object, or GeographicAxes object. You can define a unique colormap for the different axes within a figure.
  • ...
I've not actually tried it, but says it should work just fine.

Chhayank Srivastava
Chhayank Srivastava 2023년 7월 31일
Do you have co-ordinates of the grid.
You can plot the map and plot each of the grid individually and using axis properties define colormap for each grid separately.
openExample('graphics/ColormapSpecifyAxesTiledLayoutExample')
https://www.mathworks.com/help/matlab/ref/colormap.html

카테고리

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

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by