フィルターのクリア

Changing CData values for a surf plot.

53 ビュー (過去 30 日間)
Ali Shakeri
Ali Shakeri 2020 年 11 月 1 日
回答済み: Divija Aleti 2021 年 2 月 5 日
I want to symply change a surface plots Cdata with a callback.
cyl = surf(X_Length,Y_Circle,Z_Circle,'Cdata',map100);
Im trying thia cyl.Cdata = map200; but it wont work.
what can i do?
  4 件のコメント
Ali Shakeri
Ali Shakeri 2020 年 11 月 1 日
they are ofc
Ali Shakeri
Ali Shakeri 2020 年 11 月 1 日
let me post the whole code :
map100 = getCylinderHeatMap(filename);
[X_Length,Y_Circle,Z_Circle,map100] = createSurfCylinderInitial(map100);
cyl = surf(X_Length,Y_Circle,Z_Circle,'Cdata',map100);
splitFileName = strsplit(string(T{1,1}),'.');
title(compose("3D Cylinder Heatmap Plot" + "\n" + "Time: " + splitFileName{1,1}));
zlabel("Z-Position");
ylabel("Y-Position");
xlabel("X-Length(Cm)");
set(gca,'Ydir','reverse')
colormap(myHeatMap);
colorbar;
shading interp
Maximum_Value = 450;
Minimum_Value = 50;
caxis([Minimum_Value Maximum_Value]);
callback
function []= sliderCallback(b,T,myHeatMap,cyl)
value = round(b.Value);
%Testing lines load your matrix%
filename = strcat('\Users\Ali\Desktop\Documents\DataVis\Projekt\data\day\', string(T{value,1}));
map100 = getCylinderHeatMap(filename);
splitFileName = strsplit(string(T{value,1}),'.');
map100 = createSurfCylinderMapOnly(map100);
cyl.Cdata = map100;
title(compose("3D Cylinder Heatmap Plot" + "\n" + "Time: " + splitFileName{1,1}));
zlabel("Z-Position");
ylabel("Y-Position");
xlabel("X-Length(Cm)");
set(gca,'Ydir','reverse');
colormap(myHeatMap);
colorbar;
shading interp
%
Maximum_Value = 450;
Minimum_Value = 50;
caxis([Minimum_Value Maximum_Value]);
end

サインインしてコメントする。

回答 (1 件)

Divija Aleti
Divija Aleti 2021 年 2 月 5 日

カテゴリ

Help Center および File ExchangeData Distribution Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by