plotly / plotly/plotly_matlab

Issues when plotting stacked and non-stacked bar graphs on same figure

Open
#212 0 comments 0 reactions 1 assignee View on GitHub

@harshpurwar is already working on this.

Since Jul 29, 2021.

Dominant language
MATLAB
Stars
413
Forks
166
PR merge metrics
No merged PRs in 30d

Description

Not possible to plot stacked and non-stacked bar graphs on same figure:

y = [1 2 3; 4 5 6];
tiledlayout(2,1)

% Top bar graph
ax1 = nexttile;
bar(ax1,y)

% Bottom bar graph
ax2 = nexttile;
bar(ax2,y,'stacked')

fig2plotly();

Expected and generated (https://chart-studio.plotly.com/~xarico10/561/#/) plots:
Captura de Pantalla 2021-07-27 a la(s) 8 09 09 p  m
Captura de Pantalla 2021-07-27 a la(s) 8 09 38 p  m

As seen, one of the graphs shouldn't be stacked, however both are. Also, there are color mismatches.

Examples on this type of practices can be found on:
https://www.mathworks.com/help/matlab/ref/bar.html#btj3klf

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.