필터 지우기
필터 지우기

How can I render a three-compositional raster map using a ternary colormap?

조회 수: 4 (최근 30일)
Jian
Jian 2023년 8월 14일
편집: Alan 2023년 8월 24일
Say there are three raster maps, representing percentages of sand, silt and clay respectively. The three values for each cell are hence summed up to 1. I want to use one raster map to characterize the relative contribution of the three materials. I found an R package named 'tricolore' for this purpose, but it is for a vector map, like this:
but my compositional data are stored in raster format.

답변 (1개)

Alan
Alan 2023년 8월 24일
편집: Alan 2023년 8월 24일
Hi Jian,
If you have sand, silt, and clay data for each point, you could try out the geoscatter function: https://in.mathworks.com/help/matlab/ref/geoscatter.html#d124e556156
You could scale the material content to range between 0 and 1 and provide them as R, G, and B values (since you have exactly 3 quantities). The following syntax can be used:
geoscatter(lat, lon, A, C, "filled")
Where,
  1. lat: Array containing latitude values.
  2. lon: Array containing longitude values.
  3. A: Array containing size of markers (They can be increased or reduced based on the density of the data you have)
  4. C: Nx3 array in which each row represents the RGB values of each point, where N is the number of points in the raster data.
  5. “filled”: Creates filled markers.
There are functions specifically meant to plot raster maps, but they might only support a single dimensional colormap (i.e., one cannot supply 3 channels). But if you have a unified quantity like the sum of all 3 quantities like you have mentioned you could use the functions mentioned in the “Raster Data” section of this documentation page: https://in.mathworks.com/help/map/vector-and-raster-map-display.html

카테고리

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

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by