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
where the bars starts with a given offset (in this case 1).
Clearly it can be achieved with a bit of tricks, but I would prefer if one can simply provide an offset argument to bar. For example, I am now not using a logarithmic scale (and therefore there are no logarithmic minor ticks), but rather compute the log and then hard-code the y-labels.
I imagine a similar situation where one would like the bars to start at a given value and not having a log-scale, like in relative bars.
Maybe this can be done in a better way?
(I originally thought the "bottom" argument would solve this, but after testing and reading the doc-string properly, it is clear that it solves another problem.)
Proposed solution
Add an offset argument that behaves as a reference for the bar plots.
(Or provide an example where the same effect is obtained.)
The text was updated successfully, but these errors were encountered:
The fundamental problem here is that bar is parameterized by the height of the bar, and not the position of the top of the bar...
so I'm not sure an offset really helps here....
I think on a linear scale bottom is exactly what you want, but you need a negative height to get a bar to go down, and that just doesn't really work with log scale.
There are certainly a few trick you could play with transforms and such, but yeah, dealing with negative numbers on log scales is tricky, and I don't think it is solved by an offset.
Problem
I would like to create a figure similar to this:
where the bars starts with a given offset (in this case 1).
Clearly it can be achieved with a bit of tricks, but I would prefer if one can simply provide an offset argument to bar. For example, I am now not using a logarithmic scale (and therefore there are no logarithmic minor ticks), but rather compute the log and then hard-code the y-labels.
I imagine a similar situation where one would like the bars to start at a given value and not having a log-scale, like in relative bars.
Maybe this can be done in a better way?
(I originally thought the "bottom" argument would solve this, but after testing and reading the doc-string properly, it is clear that it solves another problem.)
Proposed solution
Add an offset argument that behaves as a reference for the bar plots.
(Or provide an example where the same effect is obtained.)
The text was updated successfully, but these errors were encountered: