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

Recipes broken on 0.20.x #3514

Open
3 tasks done
palday opened this issue Dec 25, 2023 · 1 comment
Open
3 tasks done

Recipes broken on 0.20.x #3514

palday opened this issue Dec 25, 2023 · 1 comment
Labels
bug Makie Backend independent issues (Makie core) plot Related to plot object recipes regression This issue describes a regression from a previous version or commit.

Comments

@palday
Copy link
Contributor

palday commented Dec 25, 2023

  • are you running newest version (version from docs) ?
  • can you reproduce the bug with a fresh environment ? (]activate --temp; add Makie)
  • What platform + GPU are you on? Linux, n/a (CairoMakie).

While trying to figure out why some recipes no longer worked, I started re-reading the recipe docs and looking at Makie's own internal use of recipes and found that there is an example in the docs: rainclouds.

image

Note that the the title, axis and category labels don't appear in the figure. Those are all set in

function plot!(
ax::Makie.Axis, P::Type{<: RainClouds},
allattrs::Attributes, category_labels, data_array)
plot = plot!(ax.scene, P, allattrs, category_labels, data_array)
if any(x -> x isa AbstractString, category_labels)
ulabels = unique(category_labels)
if !haskey(allattrs, :orientation) || allattrs.orientation[] === :vertical
ax.xticks = (1:length(ulabels), ulabels)
else
ax.yticks = (1:length(ulabels), ulabels)
end
end
if haskey(allattrs, :title)
ax.title = allattrs.title[]
end
if haskey(allattrs, :xlabel)
ax.xlabel = allattrs.xlabel[]
end
if haskey(allattrs, :ylabel)
ax.ylabel = allattrs.ylabel[]
end
reset_limits!(ax)
return plot
end
function group_labels(category_labels, data_array)
grouped = Dict{eltype(category_labels), Vector{Int}}()
for (label, data_ix) in zip(category_labels, axes(data_array,1))
push!(get!(grouped, label, eltype(data_array)[]), data_ix)
end
return pairs(grouped)
end

In my own broken recipe, I inserted some code to see which methods were being called and discovered the analogous

plot!(ax::Makie.Axis, P::Type{<: MyPlotType}, allattrs::Attributes, args...) 

method was no longer being called despite being called on 0.19.x.

@jkrumbiegel
Copy link
Member

raincloud is the odd one out of Makie's default recipes because of the nonstandard axis attributes etc. I'm actually not sure why it was allowed to be so different at the time. It kind of works around the missing complex recipe functionality of Makie

@t-bltg t-bltg added the recipes label Dec 26, 2023
palday referenced this issue in palday/MixedModelsMakie.jl Mar 22, 2024
* start work on rank deficiency

* initial pass at conversion to recipeless implementation

* version and compat bump

* Indexable

* coefplot

* ridgeplot

* ridge2d

* YAS

* CI update

* handle rank deficiency

* add tests

* YAS

* fix a scope warning

* eliminate progress message in precompilation
palday referenced this issue in palday/BoxCox.jl Mar 23, 2024
* recipe conversion

* CI bump
@ffreyer ffreyer added Makie Backend independent issues (Makie core) plot Related to plot object regression This issue describes a regression from a previous version or commit. labels Aug 26, 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) plot Related to plot object recipes regression This issue describes a regression from a previous version or commit.
Projects
None yet
Development

No branches or pull requests

4 participants