Skip to content

Fixing Issue #255 and #258 #289

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Aug 4, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion plotly/plotlyfig_aux/handlegraphics/updateSurfaceplot.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

%-SURFACE DATA STRUCTURE- %
image_data = get(obj.State.Plot(surfaceIndex).Handle);

figure_data = get(obj.State.Figure.Handle);
%-AXIS DATA-%
eval(['xaxis = obj.layout.xaxis' num2str(xsource) ';']);
eval(['yaxis = obj.layout.yaxis' num2str(ysource) ';']);
Expand Down Expand Up @@ -46,6 +46,7 @@
%-surface z-%
obj.data{surfaceIndex}.z = image_data.ZData;


else

%-surface type-%
Expand All @@ -60,6 +61,24 @@

%-------------------------------------------------------------------------%


%-image colorscale-%

cmap = figure_data.Colormap;

for c = 1: length(cmap)
x1=(c-1)/length(cmap);
if x1 > 0.99
x=round(x1);
else
x=x1;
end
obj.data{surfaceIndex}.colorscale{c} = { x , ['rgb(' num2str(255*cmap(c,1)) ',' num2str(255*cmap(c,2)) ',' num2str(255*cmap(c,3)) ',' ')' ] };
end

obj.data{surfaceIndex}.surfacecolor = image_data.CData;
%-------------------------------------------------------------------------%

%-surface name-%
obj.data{surfaceIndex}.name = image_data.DisplayName;

Expand Down