Fix barwidth to minimum(diff) not mean(diff)
This commit is contained in:
parent
dca5a7ce4d
commit
cd958a6c68
@ -365,7 +365,7 @@ function expand_extrema!(sp::Subplot, d::KW)
|
||||
|
||||
bw = d[:bar_width]
|
||||
if bw == nothing
|
||||
bw = d[:bar_width] = _bar_width * ignorenan_mean(diff(data))
|
||||
bw = d[:bar_width] = _bar_width * ignorenan_minimum(filter(x->x>0,diff(data)))
|
||||
end
|
||||
axis = sp.attr[Symbol(dsym, :axis)]
|
||||
expand_extrema!(axis, ignorenan_maximum(data) + 0.5maximum(bw))
|
||||
|
||||
@ -289,7 +289,7 @@ end
|
||||
# compute half-width of bars
|
||||
bw = d[:bar_width]
|
||||
hw = if bw == nothing
|
||||
0.5*_bar_width*ignorenan_mean(diff(procx))
|
||||
0.5*_bar_width*ignorenan_minimum(filter(x->x>0, diff(procx)))
|
||||
else
|
||||
Float64[0.5_cycle(bw,i) for i=1:length(procx)]
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user