plotly / plotly/plotly_matlab

Categorical data not supported

Đang mở
#183 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

@gilbertogalvis đang làm issue này rồi.

Từ ngày 16/10/2021.

Ngôn ngữ chính
MATLAB
Star
413
Fork
166
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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:
Captura de Pantalla 2021-07-26 a la(s) 12 03 52 a  m

An example using categorical data can be found on:
https://www.mathworks.com/help/matlab/ref/swarmchart.html#mw_b4fe23df-071d-4ceb-991c-c53325d89599

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.