Skip to content

Commit

Permalink
add glvisualize backend
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonDanisch committed Aug 24, 2016
1 parent 011f51f commit 700934d
Show file tree
Hide file tree
Showing 3 changed files with 1,066 additions and 242 deletions.
7 changes: 2 additions & 5 deletions src/axes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function Axis(sp::Subplot, letter::Symbol, args...; kw...)
lk = Symbol(letter, k)
lv = _axis_defaults_byletter[lk]
d[k] = (lv == :match ? v : lv)
end
end

# merge!(d, _axis_defaults)
d[:discrete_values] = []
Expand Down Expand Up @@ -305,15 +305,13 @@ function expand_extrema!(sp::Subplot, d::KW)

# expand for bar_width
if d[:seriestype] == :bar
dsym = vert ? :x : :y
dsym = (!vert) ? :x : :y
data = d[dsym]

bw = d[:bar_width]
if bw == nothing
bw = d[:bar_width] = mean(diff(data))
end
# @show data bw

axis = sp.attr[Symbol(dsym, :axis)]
expand_extrema!(axis, maximum(data) + 0.5maximum(bw))
expand_extrema!(axis, minimum(data) - 0.5minimum(bw))
Expand Down Expand Up @@ -485,4 +483,3 @@ function axis_drawing_info(sp::Subplot)

xticks, yticks, spine_segs, grid_segs
end

Loading

0 comments on commit 700934d

Please sign in to comment.