Skip to content

Commit 874a91f

Browse files
committed
category axis label fix
1 parent b47c6a0 commit 874a91f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

plotly/plotlyfig_aux/core/updateData.m

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,20 @@
9595
obj.data{dataIndex}.x = convertDate(obj.data{dataIndex}.x);
9696
end
9797

98+
% check for xaxis categories
99+
if strcmpi(xaxis.type, 'category')
100+
obj.data{dataIndex}.x = get(obj.State.Plot(dataIndex).AssociatedAxis,'XTickLabel');
101+
end
102+
98103
% check for yaxis dates
99104
if strcmpi(yaxis.type, 'date')
100105
obj.data{dataIndex}.y = convertDate(obj.data{dataIndex}.y);
101106
end
102107

108+
% check for yaxis categories
109+
if strcmpi(yaxis.type, 'category')
110+
obj.data{dataIndex}.y = get(obj.State.Plot(dataIndex).AssociatedAxis,'YTickLabel');
111+
end
103112
%-------------------------------------------------------------------------%
104113

105114
end

0 commit comments

Comments
 (0)