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
The following snippet will generate the attached wrong formatted bar chart. If more bars are used the formatting looks okay, so somehow the bar width and pos calculation for one or two datapoints is wrong.
This is unfortunate. It is the result of default autoscaling a categorical axis with bar charts. As a workaround you may fix the Min and Max of the x-axis manually like this:
wuc.XRange.Fixed(-0.5, 1.5, 1)
Of course you could fix it to the actual range covered by pos +- 0.5
Probably there is no sensible way to fix this automatically because:
dropping full or constrained autoscaling for bar charts or categorical bar charts is not an option
expanding the range to ExpandNextTics expands to much for categorical axes and bars at integer values
the bar width is not fixed, not even for categorical axes
Any automatic solution would have to be an ugly special case, probably with a heuristic when to trigger. Like: "For bar charts autoexpand range to cover full bar modulo Fixed and Constrained autoscaling and ignore Expansion in the RangeMode." This would work, I'll try it out but I'm afraid this new heuristic might break other existing code.
The following snippet will generate the attached wrong formatted bar chart. If more bars are used the formatting looks okay, so somehow the bar width and pos calculation for one or two datapoints is wrong.
The text was updated successfully, but these errors were encountered: