Categorical data not supported
@gilbertogalvis arbeitet bereits daran.
Seit 16.10.2021.
Bewertung
Dieses Issue wurde noch nicht bewertet.
Beschreibung
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
- Vorherrschende Sprache
- MATLAB
- Sterne
- 413
- Forks
- 166
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus plotly/plotly_matlab
-
Use valid Plotly.js CDN Offen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 55/100
plotly/plotly_matlab#526 ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 45/100
plotly/plotly_matlab#523 · 1 Kommentar ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
plotly/plotly_matlab#481 · 1 Kommentar ·
-
getplotlyfig() Error Offen
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 35/100
plotly/plotly_matlab#480 ·
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 35/100
plotly/plotly_matlab#479 · 1 Kommentar · 3 Reaktionen ·
Alle Issues in plotly/plotly_matlab
Ähnliche Issues
-
Component: Continuous Integration Component: MATLAB Type: enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 94/100
VH-Lab/NDIcalc-vis-matlab#107 ·
-
bug unconfirmed
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
gnu-octave/statistics#498 · 1 Kommentar ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100