Makie.jl icon indicating copy to clipboard operation
Makie.jl copied to clipboard

Incorrect keyword arguments for the `figure` keyword don't throw

Open DanielVandH opened this issue 5 months ago • 0 comments

  • [x] what version of Makie are you running? (]st -m Makie)
  • [x] can you reproduce the bug with a fresh environment ? (]activate --temp; add Makie)
julia> using CairoMakie

(jl_Y5LoAd) pkg> st -m Makie
Status `C:\Users\danjv\AppData\Local\Temp\jl_Y5LoAd\Manifest.toml`
  [ee78f7c6] Makie v0.21.11

julia> scatter([1.0], [1.0], figure = (; title = "1.0")) # should throw

julia> scatter([1.0], [1.0], figure = (; blahblah = "1.0")) # should throw

I expected it to error and show possible keyword arguments like e.g.

julia> scatter([1.0], [1.0], title="1.0")
ERROR: Invalid attribute title for plot type Scatter{Tuple{Vector{Point{2, Float64}}}}.

The available plot attributes for Scatter{Tuple{Vector{Point{2, Float64}}}} are:

alpha        colorscale     fxaa         inspector_clear  marker_offset  overdraw     strokewidth       visible
clip_planes  cycle          glowcolor    inspector_hover  markersize     rotation     transform_marker
color        depth_shift    glowwidth    inspector_label  markerspace    space        transformation
colormap     depthsorting   highclip     lowclip          model          ssao         transparency
colorrange   distancefield  inspectable  marker           nan_color      strokecolor  uv_offset_width


Generic attributes are:

clip_planes  cycle  dim_conversions  label  model  rasterize  transformation  xautolimits  yautolimits  zautolimits


Stacktrace:
 [1] validate_attribute_keys(plot::Scatter{Tuple{Vector{Point{2, Float64}}}})
   @ MakieCore C:\Users\danjv\.julia\packages\MakieCore\rTINf\src\recipes.jl:746
 [2] push!(scene::Scene, plot::Plot)
   @ Makie C:\Users\danjv\.julia\packages\Makie\gG38B\src\scenes.jl:459
 [3] plot!
   @ C:\Users\danjv\.julia\packages\Makie\gG38B\src\interfaces.jl:411 [inlined]
 [4] plot!(ax::Axis, plot::Scatter{Tuple{Vector{Point{2, Float64}}}})
   @ Makie C:\Users\danjv\.julia\packages\Makie\gG38B\src\figureplotting.jl:412
 [5] plot!(fa::Makie.FigureAxis, plot::Scatter{Tuple{Vector{Point{2, Float64}}}})
   @ Makie C:\Users\danjv\.julia\packages\Makie\gG38B\src\figureplotting.jl:407
 [6] _create_plot(::Function, ::Dict{Symbol, Any}, ::Vector{Float64}, ::Vararg{Vector{Float64}})
   @ Makie C:\Users\danjv\.julia\packages\Makie\gG38B\src\figureplotting.jl:318
 [7] scatter(::Vector{Float64}, ::Vararg{Vector{Float64}}; kw::@Kwargs{title::String})
   @ MakieCore C:\Users\danjv\.julia\packages\MakieCore\rTINf\src\recipes.jl:449
 [8] top-level scope
   @ REPL[17]:1

DanielVandH avatar Sep 20 '24 20:09 DanielVandH