You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been greatly enjoying using plotly but I've run into the following problem which I've been told may be a bug. When i have a couple of small bars on a bar chart, adding error bars (which do not extend to the negative region) causes a large whitespace between the xaxis and the xticks - as shown below with the accompanying script:
In your second trace, some error bar positions are close to zero (e.g. the at x=delta the error bar starts at y=0.05. So padding that y=0.05 extreme an extra 5% gets you an auto yaxis.range value in the negative. This negative starting range value is the "white space" you're referring to.
Now, I agree our default behavior isn't great for all situations. See issue #1876 for a list of planned auto-range-related improvements.
I think this can be considered a bug - as long as the negative sides of the errorbars don't reach past zero, we should give autorange a tight bound at 0. Likely this can be accomplished by having the errorbar calc inherit the tozero option bars pass to Axes.findExtremes:
which does exactly that: as long as the pre-padding lower bound is above zero (or the pre-padding upper bound is below zero) it adds a tight bound at zero, but the padding comes back as soon as you have explicit bounds on both sides of zero.
Note #3031 complicates this a bit... so the two should probably be tackled together.
etpinard
changed the title
xaxis to tick white space when adding error bars
Error bars on bar traces should adhere to 'tozero' findExtreme option
Sep 21, 2018
Hi all,
I've been greatly enjoying using plotly but I've run into the following problem which I've been told may be a bug. When i have a couple of small bars on a bar chart, adding error bars (which do not extend to the negative region) causes a large whitespace between the xaxis and the xticks - as shown below with the accompanying script:
The whitespace dissappears when I remove orange bars. There are more details in the link I first made below
https://community.plot.ly/t/large-white-space-between-xaxis-and-xticks/13739/3
Thanks,
Harry T
The text was updated successfully, but these errors were encountered: