Merge branch 'JuliaPlots/master' into showlibrary

This commit is contained in:
Michael K. Borregaard 2017-02-27 21:48:33 +01:00
commit f7de9fbea4
4 changed files with 12 additions and 3 deletions

View File

@ -1017,7 +1017,7 @@ function gr_display(sp::Subplot{GRBackend}, w, h, viewport_canvas)
end
if series[:markershape] != :none
gr_draw_markers(series, xpos-[0.06,0.02], [ypos,ypos], 10, nothing)
gr_draw_markers(series, xpos - .035, ypos, 6, nothing)
end
if typeof(series[:label]) <: Array

View File

@ -31,6 +31,7 @@ const _plotly_attr = merge_with_base_supported([
:hover,
:inset_subplots,
:bar_width,
:clims,
])
const _plotly_seriestype = [
@ -438,6 +439,11 @@ function plotly_series(plt::Plot, series::Series)
end
end
clims = sp[:clims]
if is_2tuple(clims)
d_out[:zmin], d_out[:zmax] = clims
end
# set the "type"
if st in (:path, :scatter, :scattergl)
d_out[:type] = st==:scattergl ? "scattergl" : "scatter"

View File

@ -410,6 +410,8 @@ function my_hist(v, bins; normed = false, weights = nothing)
counts[idx] += (weights == nothing ? 1.0 : weights[i])
end
counts = isapprox(extrema(diff(edges))...) ? counts : counts ./ diff(edges) # for uneven bins, normalize to area.
# normalize by bar area?
norm_denom = normed ? sum(diff(edges) .* counts) : 1.0
if norm_denom == 0
@ -424,7 +426,8 @@ end
edges, counts = my_hist(y, d[:bins],
normed = d[:normalize],
weights = d[:weights])
x := edges
bar_width := diff(edges)
x := centers(edges)
y := counts
seriestype := :bar
()

View File

@ -23,7 +23,7 @@ facts("PyPlot") do
@fact pyplot() --> Plots.PyPlotBackend()
@fact backend() --> Plots.PyPlotBackend()
image_comparison_facts(:pyplot, skip=[25,30], eps=img_eps)
image_comparison_facts(:pyplot, skip=[6,25,30], eps=img_eps)
end
facts("GR") do