You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've found it useful to define * for Makie.RichText. I thought it would be a little nice addition. See below for an example to illustrate how it can be useful.
I sometimes write functions that call Makie functions and in my functions, I don't know the type of string arguments. They can be just Strings or Makie.RichTexts:
using CairoMakie
function Base.:*(x::Makie.RichText, y::AbstractString)
rich(x, y)
endfunction Base.:*(x::AbstractString, y::Makie.RichText)
rich(x, y)
endfunctionplotsomething(title)
mytitle ="hello, "* title *"!"# plot something using mytitleendplotsomething("x")
plotsomething(rich("x", superscript("y")))
The text was updated successfully, but these errors were encountered:
Feature description
I've found it useful to define
*
forMakie.RichText
. I thought it would be a little nice addition. See below for an example to illustrate how it can be useful.I sometimes write functions that call
Makie
functions and in my functions, I don't know the type of string arguments. They can be justString
s orMakie.RichText
s:The text was updated successfully, but these errors were encountered: