plotly / plotly/plotly_matlab

Problems with the legend when plotting multiple charts on same figure

Đang mở
#195 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 18/8/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 placing a legend on a figure with multiple charts, only one of them is correctly labeled.
For example,

y2010 = [50 0 100 95];
y2011 = [65 22 97 120];
labels = {'Investments','Cash','Operations','Sales'};

t = tiledlayout(1,2,'TileSpacing','compact');

% Create pie charts
ax1 = nexttile;
pie(ax1,y2010)
title('2010')

ax2 = nexttile;
pie(ax2,y2011)
title('2011')

% Create legend
lgd = legend(labels);
lgd.Layout.Tile = 'east';

fig2plotly();

Expected and generated () plots:

Captura de Pantalla 2021-07-26 a la(s) 4 34 21 p  m Captura de Pantalla 2021-07-26 a la(s) 4 34 46 p  m

As you can see, the two legends are pretty different.

The previous example can be found on:
https://www.mathworks.com/help/matlab/ref/pie.html#responsive_offcanvas

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.