Replies: 1 comment 1 reply
-
Full stack tracejulia> text("hi", color=[Makie.Colors.RGBA{Float64}(0, 1, 0, 0), Makie.Colors.RGBA{Float64}(1, 0, 0, 0)])
ERROR: TypeError: in new, expected Makie.ScalarOrVector{ColorTypes.RGBA{Float32}}, got a value of type Makie.ScalarOrVector{Vector{ColorTypes.RGBA{Float32}}}
Stacktrace:
[1] Makie.GlyphCollection(glyphs::Vector{Char}, fonts::Vector{FreeTypeAbstraction.FTFont}, origins::Vector{Point{3, Float32}}, extents::Vector{FreeTypeAbstraction.FontExtent{Float32}}, scales::Vector{Vec{2, Float32}}, rotations::Vector{Quaternionf0}, colors::Vector{Vector{ColorTypes.RGBA{Float32}}}, strokecolors::Vector{ColorTypes.RGBA{Float32}}, strokewidths::Vector{Int64})
@ Makie ~/.julia/packages/Makie/NL7Xw/src/types.jl:342
[2] glyph_collection(str::String, font_per_char::Base.Generator{String, Makie.var"#659#660"{FreeTypeAbstraction.FTFont}}, fontscale_px::Base.Generator{String, Makie.var"#657#658"{Float32}}, halign::Symbol, valign::Symbol, lineheight_factor::Float64, justification::MakieCore.Automatic, rotation::Quaternionf0, color::Vector{ColorTypes.RGBA{Float32}}, strokecolor::ColorTypes.RGBA{Float32}, strokewidth::Int64)
@ Makie ~/.julia/packages/Makie/NL7Xw/src/layouting/layouting.jl:213
[3] layout_text
@ ~/.julia/packages/Makie/NL7Xw/src/layouting/layouting.jl:53 [inlined]
[4] (::Makie.var"#975#976")(str::String, ts::Int64, f::String, al::Tuple{Symbol, Symbol}, rot::Float64, jus::MakieCore.Automatic, lh::Float64, col::Vector{ColorTypes.RGBA{Float64}}, scol::Tuple{Symbol, Float64}, swi::Int64)
@ Makie ~/.julia/packages/Makie/NL7Xw/src/basic_recipes/text.jl:13
[5] lift(::Function, ::Observable{String}, ::Observable{Any}, ::Vararg{Observable{Any}}; kw::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Makie ~/.julia/packages/Makie/NL7Xw/src/interaction/nodes.jl:13
[6] lift(::Function, ::Observable{String}, ::Observable{Any}, ::Observable{Any}, ::Vararg{Observable{Any}})
@ Makie ~/.julia/packages/Makie/NL7Xw/src/interaction/nodes.jl:10
[7] plot!(plot::MakieCore.Text{Tuple{String}})
@ Makie ~/.julia/packages/Makie/NL7Xw/src/basic_recipes/text.jl:3
[8] plot!(scene::Scene, P::Type{MakieCore.Text{Tuple{String}}}, attributes::Attributes, input::Tuple{Observable{String}}, args::Observable{Tuple{String}})
@ Makie ~/.julia/packages/Makie/NL7Xw/src/interfaces.jl:428
[9] plot!(scene::Scene, P::Type{MakieCore.Text}, attributes::Attributes, args::String; kw_attributes::Base.Pairs{Symbol, Bool, Tuple{Symbol}, NamedTuple{(:show_axis,), Tuple{Bool}}})
@ Makie ~/.julia/packages/Makie/NL7Xw/src/interfaces.jl:339
[10] plot(P::Type{MakieCore.Text}, args::String; axis::NamedTuple{(), Tuple{}}, figure::NamedTuple{(), Tuple{}}, kw_attributes::Base.Pairs{Symbol, Vector{ColorTypes.RGBA{Float64}}, Tuple{Symbol}, NamedTuple{(:color,), Tuple{Vector{ColorTypes.RGBA{Float64}}}}})
@ Makie ~/.julia/packages/Makie/NL7Xw/src/figureplotting.jl:28
[11] #text#51
@ ~/.julia/packages/MakieCore/S8PkO/src/recipes.jl:31 [inlined]
[12] top-level scope
@ REPL[92]:1It looks like |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When passing in a color vector to a single text() plot, the following error occurs:
TypeError: in new, expected Makie.ScalarOrVector{RGBA{Float32}}, got a value of type Makie.ScalarOrVector{Vector{RGBA{Float32}}}The code to reproduce this error is
text("hi", color=[:green, :green]The docs say a char vector can be passed in, but it does not clarify whether it works with a single text string input (as opposed to vector).
Beta Was this translation helpful? Give feedback.
All reactions