the marker size on the left is 1.4, on the right 1.5, where the error bar is not drawn anymore for the leftmost marker (although it should be still visible with this marker style). Is there a way to force drawing the error bars always?
I agree that the idea makes sense, however, as you can see in the plot, the error bar actually wouldn’t be completely hidden by the marker, and it looks like the point doesn’t have any (measurable) error which is not true. So I consider this as a bug…
Let’s say, it would be nice to have a draw option in TGraphPainter which forces the errors (with end tick markers) to be drawn.
My workaround for now is to create two TGraphs, one with marker style 1, and the second with the real markers and draw them on top of each other. This is somewhat cumbersome.
The logic in the code is the following:
When drawing the Y top error bar if the bottom of the error bar is higher than the top of the error bar then the error bar is not drawn. That’s logic …
This case can occur because the bottom of the error bar is computed according to the symbol size. The error bar includes the bar itself and the horizontal terminators.
If I do what you suggest (drawing always the terminators) you may end up with some plot like the following one:
which is not really nice… So I guess the workaround you are using is the right way to proceed .
In any case I think it is also good to point out the fact the marker is too large compared to the real extend of the error bars. Because in a way you are extending artificially the real value of the errors which is a bit misleading …
Yes, the sketch you made is exactly what happens, i.e. the end bar markers cross the main marker. Your last statement about the marker being larger than the errors doesn’t worry me at all, if only error bars without end markers are drawn.
The problem when skipping to draw the error bars including end markers in case the main marker hides the vertical error itself is, that visually the entry looks like there isn’t any error present. I think the visual impression is misleading, because it looks like being unintended, since one expects to see these horizontal lines at every entry. It actually took me quite some time to realize, that this was not a bug in my macro when setting the errors but a feature of TGraphPainter.
As I said, it’s fine that by default the error bars are skipped in such cases, but as user I’d like to have an option to suppress that supression of error bar drawing.
I think the choice of “not drawing it” was to make clear that the marker is too big and hides the error bars. And it seems to work as it attracted your attention. If somebody wants to draw the end ticks anyway it should be clear that it is done on purpose despite the fact the marker is bigger than the errors. And in that case it worse the effort using the work around you found or make the marker a bit smaller.