Merge pull request #1064 from mkborregaard/fix-barwidth

Change default bar width to 0.8
This commit is contained in:
Michael Krabbe Borregaard 2017-09-03 17:28:47 +02:00 committed by GitHub
commit 04f5d7e411
3 changed files with 4 additions and 2 deletions

View File

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

View File

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

View File

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