Change default bar width to 0.8

This commit is contained in:
Michael K. Borregaard 2017-08-31 23:58:07 +02:00
parent cc15882faf
commit 2dcf7fb3dd
3 changed files with 4 additions and 2 deletions

View File

@ -193,6 +193,8 @@ const _framestyleAliases = Dict{Symbol, Symbol}(
:transparent => :semi, :transparent => :semi,
:semitransparent => :semi, :semitransparent => :semi,
) )
const _bar_width = 0.8
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
const _series_defaults = KW( const _series_defaults = KW(

View File

@ -365,7 +365,7 @@ function expand_extrema!(sp::Subplot, d::KW)
bw = d[:bar_width] bw = d[:bar_width]
if bw == nothing if bw == nothing
bw = d[:bar_width] = ignorenan_mean(diff(data)) bw = d[:bar_width] = _bar_width * ignorenan_mean(diff(data))
end end
axis = sp.attr[Symbol(dsym, :axis)] axis = sp.attr[Symbol(dsym, :axis)]
expand_extrema!(axis, ignorenan_maximum(data) + 0.5maximum(bw)) expand_extrema!(axis, ignorenan_maximum(data) + 0.5maximum(bw))

View File

@ -289,7 +289,7 @@ end
# compute half-width of bars # compute half-width of bars
bw = d[:bar_width] bw = d[:bar_width]
hw = if bw == nothing hw = if bw == nothing
0.5ignorenan_mean(diff(procx)) 0.5*_bar_width*ignorenan_mean(diff(procx))
else else
Float64[0.5_cycle(bw,i) for i=1:length(procx)] Float64[0.5_cycle(bw,i) for i=1:length(procx)]
end end