-
-
Notifications
You must be signed in to change notification settings - Fork 328
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
Wrap tutorial doesn't work anymore #3901
Comments
I don't think the specific example you showed should ever work - the error message is correct in this case, barplot doesn't have an overload defined for MyHist. You would want either Plus, the examples are all rendered in the documentation ;) which means they do work there at least! |
Good point 🤔. Works in the docs because we have the convert arguments. In this case I want to add extra keyword arguments to errorbar(MyHist), they change how the errorbars are calculated. I think in this case I have to defer these into the convert arguments, but how? Can I just add extra arguments to convert_arguments? |
|
See e.g. SciMLBase's Makie ext for an example. |
You mean I have to specify plot type? Btw just as an FYI, this approach did work before 0.21, maybe by mistake? |
Both plot type and argument types for dispatch purposes. So for example Makie.used_attributes(::Type{<: Errorbars}, h::Hist1D) = (:error_function,)
Makie.convert_attributes(::Type{<: Errorbars}, h::Hist1D; error_function = nothing) = do_something(h, error_function) As for this working before 0.21: did the plot turn out correct?! That would definitely be a mistake IMO :D |
plot looks correct: Moelf/FHist.jl#118 |
you meant |
ah yes, my bad |
worked like a charm: Moelf/FHist.jl#118 (comment) |
in #3736 and #3816 we added https://docs.makie.org/v0.21/tutorials/wrap-existing-recipe
but it actually doesn't work anymore:
@SimonDanisch @asinghvi17
The text was updated successfully, but these errors were encountered: