Skip to content

Commit

Permalink
Revert "Merge pull request #353 from Moelf/groupbar_dodge_log"
Browse files Browse the repository at this point in the history
This reverts commit d8ef19a.
  • Loading branch information
daschw authored and BeastyBlacksmith committed Aug 6, 2020
1 parent ba8702a commit 027a2a6
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/bar.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ grouped_xy(y::AbstractArray) = 1:size(y,1), y

nr, nc = size(y)
isstack = pop!(plotattributes, :bar_position, :dodge) == :stack
isylog = pop!(plotattributes, :yscale, :identity) (:log10, :log)
the_ylims = pop!(plotattributes, :ylims, (-Inf, Inf))
isylog = pop!(plotattributes, :yscale, :identity) == :log10

# extract xnums and set default bar width.
# might need to set xticks as well
Expand Down Expand Up @@ -48,14 +47,13 @@ grouped_xy(y::AbstractArray) = 1:size(y,1), y
end

# compute fillrange
y, fr = groupedbar_fillrange(y)
fillrange := if isylog
if isstack
fill_bottom = min(minimum(y) / 100, the_ylims[1])
# to fill the blank of the bottom segment depeding on if ylims
replace!(fr, 0 => fill_bottom)
fillrange := if isstack
y, fr = groupedbar_fillrange(y)
if isylog
# to fill the blank of the bottom segment
replace!(fr, 0=>eps(Float64))
else
max(minimum(y) / 100, the_ylims[1])
fr
end
else
get(plotattributes, :fillrange, nothing)
Expand Down

0 comments on commit 027a2a6

Please sign in to comment.