Skip to content

Issues when using negative data on bar graphs #211

Closed
@xarico10

Description

@xarico10

When using negative data on a stacked bar graph, some problems are happening.

x = [1980 1990 2000];
y = [15 20 -5; 10 -17 21; -10 5 15];
bar(x,y,'stacked')

fig2plotly();

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

As seen, there are many problems: On the first bar, no negative data is being plotted. On the second one, seems like if only one series is being plotted (and not reaching the correct value). On the third one only two series are being plotted.

Examples on using negative data can be found on:
https://www.mathworks.com/help/matlab/ref/bar.html#mw_4e8dc5f0-041d-417b-b88e-adf416d47558

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions