Surface with 4th argument for color

조회 수: 7 (최근 30일)
Nikolay Rodionov
Nikolay Rodionov 2012년 5월 18일
댓글: sruthi peesapati 2022년 3월 11일
Hi, I was wondering if someone could tell me if there is a way to add custom coloring to a surface based on a 4th variable. I work in in molecular dynamics and I have modeled a molecular surface based on X, Y, Z coordinates. Now, I'd like to color the surface based on a charge variable.
Can this be done?
  댓글 수: 1
sruthi peesapati
sruthi peesapati 2022년 3월 11일
hi nikolay.
i want to do something similar. did you find a way out to plot the surface color based on 4th variable ?

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

채택된 답변

Sean de Wolski
Sean de Wolski 2012년 5월 18일
Sure, use the fourth argument as an index into your colormap's colors, much like I did here:

추가 답변 (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