plotly / plotly/plotly_matlab

Problems with the legend when plotting multiple charts on same figure

Aperta
#195 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@gilbertogalvis ci sta già lavorando.

Dal 18/8/2021.

Lingua principale
MATLAB
Stelle
413
Fork
166
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.