Skip to content

Commit

Permalink
update usage of discrete_values! (JuliaPlots#499)
Browse files Browse the repository at this point in the history
  • Loading branch information
BeastyBlacksmith authored and getzze committed Sep 6, 2022
1 parent 2801b4f commit c48614e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Interpolations = "0.12, 0.13"
KernelDensity = "0.5, 0.6"
MultivariateStats = "0.9"
Observables = "0.2.2, 0.3, 0.4, 0.5"
Plots = "0.28, 0.29, 1.0"
Plots = "1.29"
RecipesBase = "0.6, 0.7, 0.8, 1"
RecipesPipeline = "0.1.6, 0.2, 0.3, 0.4, 0.5"
Reexport = "0.2, 1.0"
Expand Down
2 changes: 1 addition & 1 deletion src/boxplot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ notch_width(q2, q4, N) = 1.58 * (q4-q2)/sqrt(N)
end

# make the shape
center = Plots.discrete_value!(plotattributes[:subplot][:xaxis], glabel)[1]
center = Plots.discrete_value!(plotattributes, :x, glabel)[1]
hw = 0.5_cycle(bw, i) # Box width
HW = 0.5_cycle(ww, i) # Whisker width
l, m, r = center - hw, center, center + hw
Expand Down
2 changes: 1 addition & 1 deletion src/dotplot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# filter y
groupy = y[filter(i -> _cycle(x,i) == grouplabel, 1:length(y))]

center = Plots.discrete_value!(plotattributes[:subplot][:xaxis], grouplabel)[1]
center = Plots.discrete_value!(plotattributes, :x, grouplabel)[1]
halfwidth = 0.5_cycle(barwidth, i)

offsets = getoffsets(halfwidth, groupy)
Expand Down
2 changes: 1 addition & 1 deletion src/violin.jl
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ get_quantiles(n::Int) = range(0, 1, length = n + 2)[2:end-1]
widths = hw * widths / Plots.ignorenan_maximum(widths)

# make the violin
xcenter = Plots.discrete_value!(plotattributes[:subplot][:xaxis], glabel)[1]
xcenter = Plots.discrete_value!(plotattributes, :x, glabel)[1]
xcoords = if (side==:right)
vcat(widths, zeros(length(widths))) .+ xcenter
elseif (side==:left)
Expand Down

0 comments on commit c48614e

Please sign in to comment.