Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 94811f7

Browse files
Remove unnecessary conversion to datenum
1 parent 1fc139c commit 94811f7

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

plotly/plotlyfig_aux/handlegraphics/updateBar.m

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -56,25 +56,15 @@
5656
data.name = barData.DisplayName;
5757
data.visible = barData.Visible == "on";
5858

59-
xData = barData.XData;
60-
yData = barData.YData;
61-
62-
if isdatetime(xData)
63-
xData = datenum(xData);
64-
end
65-
if isdatetime(yData)
66-
yData = datenum(yData);
67-
end
68-
6959
switch barData.Horizontal
7060
case "off"
7161
data.orientation = "v";
72-
data.x = xData;
73-
data.y = yData;
62+
data.x = barData.XData;
63+
data.y = barData.YData;
7464
case "on"
7565
data.orientation = "h";
76-
data.x = yData;
77-
data.y = xData;
66+
data.x = barData.YData;
67+
data.y = barData.XData;
7868
end
7969

8070
data.marker = extractAreaFace(barData);

0 commit comments

Comments
 (0)