Merge branch 'JuliaPlots/master' into showlibrary
This commit is contained in:
commit
f7de9fbea4
@ -1017,7 +1017,7 @@ function gr_display(sp::Subplot{GRBackend}, w, h, viewport_canvas)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if series[:markershape] != :none
|
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
|
end
|
||||||
|
|
||||||
if typeof(series[:label]) <: Array
|
if typeof(series[:label]) <: Array
|
||||||
|
|||||||
@ -31,6 +31,7 @@ const _plotly_attr = merge_with_base_supported([
|
|||||||
:hover,
|
:hover,
|
||||||
:inset_subplots,
|
:inset_subplots,
|
||||||
:bar_width,
|
:bar_width,
|
||||||
|
:clims,
|
||||||
])
|
])
|
||||||
|
|
||||||
const _plotly_seriestype = [
|
const _plotly_seriestype = [
|
||||||
@ -438,6 +439,11 @@ function plotly_series(plt::Plot, series::Series)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
clims = sp[:clims]
|
||||||
|
if is_2tuple(clims)
|
||||||
|
d_out[:zmin], d_out[:zmax] = clims
|
||||||
|
end
|
||||||
|
|
||||||
# set the "type"
|
# set the "type"
|
||||||
if st in (:path, :scatter, :scattergl)
|
if st in (:path, :scatter, :scattergl)
|
||||||
d_out[:type] = st==:scattergl ? "scattergl" : "scatter"
|
d_out[:type] = st==:scattergl ? "scattergl" : "scatter"
|
||||||
|
|||||||
@ -410,6 +410,8 @@ function my_hist(v, bins; normed = false, weights = nothing)
|
|||||||
counts[idx] += (weights == nothing ? 1.0 : weights[i])
|
counts[idx] += (weights == nothing ? 1.0 : weights[i])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
counts = isapprox(extrema(diff(edges))...) ? counts : counts ./ diff(edges) # for uneven bins, normalize to area.
|
||||||
|
|
||||||
# normalize by bar area?
|
# normalize by bar area?
|
||||||
norm_denom = normed ? sum(diff(edges) .* counts) : 1.0
|
norm_denom = normed ? sum(diff(edges) .* counts) : 1.0
|
||||||
if norm_denom == 0
|
if norm_denom == 0
|
||||||
@ -424,7 +426,8 @@ end
|
|||||||
edges, counts = my_hist(y, d[:bins],
|
edges, counts = my_hist(y, d[:bins],
|
||||||
normed = d[:normalize],
|
normed = d[:normalize],
|
||||||
weights = d[:weights])
|
weights = d[:weights])
|
||||||
x := edges
|
bar_width := diff(edges)
|
||||||
|
x := centers(edges)
|
||||||
y := counts
|
y := counts
|
||||||
seriestype := :bar
|
seriestype := :bar
|
||||||
()
|
()
|
||||||
|
|||||||
@ -23,7 +23,7 @@ facts("PyPlot") do
|
|||||||
@fact pyplot() --> Plots.PyPlotBackend()
|
@fact pyplot() --> Plots.PyPlotBackend()
|
||||||
@fact backend() --> 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
|
end
|
||||||
|
|
||||||
facts("GR") do
|
facts("GR") do
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user