Skip to content

Commit

Permalink
disallow x, y, z for barplot
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonDanisch committed Jan 29, 2024
1 parent 6bba224 commit e4e4538
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/basic_recipes/barplot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,10 @@ function barplot_labels(xpositions, ypositions, bar_labels, in_y_direction, flip
end

function Makie.plot!(p::BarPlot)

bar_points = p[1]
if !(eltype(bar_points[]) <: Point2)
error("barplot only accepts x/y coordinates. Use `barplot(x, y)` or `barplot(xy::Vector{<:Point2})`.")
end
labels = Observable(Tuple{Union{String,LaTeXStrings.LaTeXString}, Point2f}[])
label_aligns = Observable(Vec2f[])
label_offsets = Observable(Vec2f[])
Expand Down

0 comments on commit e4e4538

Please sign in to comment.