Categorical data not supported
Aperta
@gilbertogalvis ci sta già lavorando.
Dal 16/10/2021.
- Lingua principale
- MATLAB
- Stelle
- 413
- Fork
- 166
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Valutazione
Questa issue non è ancora stata valutata.