Skip to content

Problems with spacing between series on bar charts #230

Closed
@xarico10

Description

@xarico10

When plotting multiple series, the spacing between them isn't the same as MATLAB's and becomes harder to read and understand the graph.

x = [1980 1990 2000];
y = [40 50 63 52; 42 55 50 48; 30 20 44 40];
barh(x,y)
xlabel('Snowfall')
ylabel('Year')
legend({'Springfield','Fairview','Bristol','Jamesville'})

fig2plotly(gcf, 'offline', false);

Expected and generated (https://chart-studio.plotly.com/~xarico10/565/#/) plots:
Captura de Pantalla 2021-07-30 a la(s) 3 37 17 p  m
Captura de Pantalla 2021-07-30 a la(s) 3 37 32 p  m

As seen, the spacing between the values corresponding to 2000, 1990 and 1980 are more separated in MATLAB's plot, but not in the generated plot. It should be a bigger gap space between years.

Examples on plotting multiple series can be found on:
https://www.mathworks.com/help/matlab/ref/barh.html#d123e71912

Metadata

Metadata

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