Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
xarico10 opened this issue Jul 28, 2021 · 0 comments
Open
Assignees

Comments

@xarico10
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants