Categorical data not supported
@gilbertogalvis 已经在做这个了。
开始于 2021年10月16日。
评估
这个 Issue 还没有评估数据。
描述
When using categorical data on different types of plots, an error is being printed.
For example,
tbl = readtable(fullfile(matlabroot,'examples','matlab','data','BicycleCounts.csv'));
daynames = ["Sunday" "Monday" "Tuesday" "Wednesday" "Thursday" "Friday" "Saturday"];
x = categorical(tbl.Day,daynames);
y = tbl.Total;
c = hour(tbl.Timestamp);
swarmchart(x,y,20,c,'filled');
fig2plotly();
Prints the following warning message:
Index in position 2 exceeds array bounds (must not exceed 1).
We had trouble parsing the scatter object.
This trace might not render properly.
Then, prints the following error:
Error using response_handler (line 31)
Hm... Plotly had some trouble decoding your
'args'. Are you sure your data or styling object
is in the right format? Check out the examples
at https://plotly.com/api for guidance.
Need help? Please try searching Plotly's <a
href='http://stackoverflow.com/questions/tagged/plotly'>Stack
Overflow channel</a>.
Error in makecall (line 32)
response_handler(resp);
Error in plotly (line 28)
response = makecall(args, origin, structargs);
Error in plotlyfig/plotly (line 437)
response = plotly(obj.data,
args);
Error in fig2plotly (line 49)
p.plotly;
Error in D_swarmchart_4 (line 42)
fig2plotly();
Expected plot:

An example using categorical data can be found on:
https://www.mathworks.com/help/matlab/ref/swarmchart.html#mw_b4fe23df-071d-4ceb-991c-c53325d89599
- 主要语言
- MATLAB
- 星标
- 413
- 派生
- 166
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
plotly/plotly_matlab 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 55/100
plotly/plotly_matlab#526 ·
-
难度 3/5 1-2 天 新手友好度 45/100
plotly/plotly_matlab#523 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 35/100
plotly/plotly_matlab#481 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 35/100
plotly/plotly_matlab#480 ·
-
难度 1/5 1 小时以内 新手友好度 35/100
plotly/plotly_matlab#479 · 1 条评论 · 3 个 reaction ·
查看 plotly/plotly_matlab 的全部 Issue
相似的 Issue
-
Component: Continuous Integration Component: MATLAB Type: enhancement
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 1/5 1 小时以内 新手友好度 94/100
VH-Lab/NDIcalc-vis-matlab#107 ·
-
bug unconfirmed
难度 1/5 1 小时以内 新手友好度 88/100
-
难度 2/5 1-3 小时 新手友好度 70/100
gnu-octave/statistics#498 ·
-
难度 2/5 1-3 小时 新手友好度 78/100