Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UndefVarError when plotting text #3869

Closed
Octogonapus opened this issue May 16, 2024 · 1 comment
Closed

UndefVarError when plotting text #3869

Octogonapus opened this issue May 16, 2024 · 1 comment
Labels
bug Makie Backend independent issues (Makie core)

Comments

@Octogonapus
Copy link
Contributor

Octogonapus commented May 16, 2024

Makie 0.21.0, GLMakie 0.10.0.

Using two different floating point types in position cause this error.

julia> text!(ax, "foo", position = (Float64(0), Float32(0)))
ERROR: UndefVarError: `T` not defined
Stacktrace:
  [1] convert_arguments(#unused#::PointBased, position::Tuple{Float64, Float32})
    @ Makie ~/.julia/packages/Makie/eziUH/src/conversions.jl:77
  [2] convert_arguments(#unused#::Type{MakieCore.Text}, args::Tuple{Float64, Float32})
    @ Makie ~/.julia/packages/Makie/eziUH/src/basic_recipes/text.jl:14
  [3] conversion_pipeline(P::Type{MakieCore.Text}, used_attrs::Tuple{}, args::Tuple{Tuple{Float64, Float32}}, args_obs::Tuple{Observable{Any}}, user_attributes::Dict{Symbol, Any}, deregister::Vector{Observables.ObserverFunction}, recursion::Int64)
    @ Makie ~/.julia/packages/Makie/eziUH/src/interfaces.jl:222
  [4] conversion_pipeline(P::Type{MakieCore.Text}, used_attrs::Tuple{}, args::Tuple{Tuple{Float64, Float32}}, args_obs::Tuple{Observable{Any}}, user_attributes::Dict{Symbol, Any}, deregister::Vector{Observables.ObserverFunction})
    @ Makie ~/.julia/packages/Makie/eziUH/src/interfaces.jl:213
  [5] (MakieCore.Text)(user_args::Tuple{Observable{Any}}, user_attributes::Dict{Symbol, Any})
    @ Makie ~/.julia/packages/Makie/eziUH/src/interfaces.jl:271
  [6] _create_plot!(F::Function, attributes::Dict{Symbol, Any}, scene::MakieCore.Text{Tuple{String}}, args::Observable{Any})
    @ Makie ~/.julia/packages/Makie/eziUH/src/figureplotting.jl:390
  [7] text!(::MakieCore.Text{Tuple{String}}, ::Vararg{Any}; kw::Base.Pairs{Symbol, Any, NTuple{37, Symbol}, NamedTuple{(:transparency, :alpha, :inspector_clear, :strokecolor, :position, :visible, :space, :colormap, :text, :fonts, :inspector_hover, :colorscale, :ssao, :highclip, :word_wrap_width, :justification, :font, :align, :inspector_label, :nan_color, :strokewidth, :rotation, :overdraw, :lineheight, :transformation, :model, :depth_shift, :colorrange, :color, :offset, :dim_conversions, :markerspace, :fontsize, :inspectable, :fxaa, :lowclip, :transform_marker), Tuple{Observable{Any}, Observable{Any}, Observable{Any}, Observable{Any}, Observable{Any}, Observable{Any}, Observable{Any}, Observable{Any}, Observable{String}, Attributes, Vararg{Observable{Any}, 27}}}})
    @ MakieCore ~/.julia/packages/MakieCore/zeHIC/src/recipes.jl:440
  [8] plot!(plot::MakieCore.Text{Tuple{String}})
    @ Makie ~/.julia/packages/Makie/eziUH/src/basic_recipes/text.jl:142
  [9] connect_plot!(parent::Scene, plot::MakieCore.Text{Tuple{String}})
    @ Makie ~/.julia/packages/Makie/eziUH/src/interfaces.jl:380
 [10] plot!
    @ ~/.julia/packages/Makie/eziUH/src/interfaces.jl:389 [inlined]
 [11] plot!(ax::Axis, plot::MakieCore.Text{Tuple{String}})
    @ Makie ~/.julia/packages/Makie/eziUH/src/figureplotting.jl:412
 [12] _create_plot!(::Function, ::Dict{Symbol, Any}, ::Axis, ::String)
    @ Makie ~/.julia/packages/Makie/eziUH/src/figureplotting.jl:381
 [13] text!(::Axis, ::Vararg{Any}; kw::Base.Pairs{Symbol, Tuple{Float64, Float32}, Tuple{Symbol}, NamedTuple{(:position,), Tuple{Tuple{Float64, Float32}}}})
    @ MakieCore ~/.julia/packages/MakieCore/zeHIC/src/recipes.jl:440
 [14] top-level scope
    @ REPL[12]:1
@asinghvi17 asinghvi17 added the Makie Backend independent issues (Makie core) label May 17, 2024
@ffreyer
Copy link
Collaborator

ffreyer commented May 24, 2024

This can probably be fixed by a convert_arguments method that converts t::Tuple to Point(t)

SimonDanisch added a commit that referenced this issue May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Makie Backend independent issues (Makie core)
Projects
None yet
Development

No branches or pull requests

3 participants