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
using GLMakie
@recipe complex DualView (x, y) begin"Color for scatter plot"
scatter_color =:blue"Color for line plot"
line_color =:redendfunction Makie.plot!(cr::DualView)
# cr[row, col] returns a RecipeSubfig that tracks created axes# cr.x, cr.y give access to converted arguments# cr.scatter_color gives access to attributesscatter(cr[1, 1], cr.x, cr.y; color=cr.scatter_color)
lines(cr[1, 2], cr.x, cr.y; color=cr.line_color)
return cr
end
fig, ax, cr =dualview(1:10, rand(10)) # Creates Figure + ComplexRecipedualview(fig[2, 1], 1:10, rand(10)) # Places in existing figure position
We still need to discuss the return type, corner cases and clean up the implementation.
I think theming already kind of works, but haven't really tested it.
We had some discussion internally about what these should return. [fig,] ax, complex_recipe matches up nicely with normal plots, but there can be multiple equally important axes to return. Or none. The other option would be to return [fig,] complex_recipe, where you are forced to grab the axis with complex_recipe[i, j].
The other option would be to return [fig,] complex_recipe, where you are forced to grab the axis with complex_recipe[i, j].
I like this better but like with Gridposition you'll have to use a content(recipe_object[i, j]) as there can be multiple objects in the same grid location
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a prototype and enables:
We still need to discuss the return type, corner cases and clean up the implementation.
I think theming already kind of works, but haven't really tested it.