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

Element-wise automatic configuration #136

Open
filchristou opened this issue Jun 29, 2023 · 1 comment
Open

Element-wise automatic configuration #136

filchristou opened this issue Jun 29, 2023 · 1 comment

Comments

@filchristou
Copy link
Collaborator

As mentioned in #89 (comment), currently Makie.automatic applies holistically per attribute. However, sometimes it might be needed to leave the attribute behave mostly automatic but adjust a thingy or two manually.

Example

graphplot(graph; elabels_rotation = DefaultDict(automatic, Edge(1,2) => π/2)

should have all labels with the default rotation (like passing elabels_rotation=automatic)
but tweak label rotation for Edge(1,2) to be π/2

@hexaeder
Copy link
Collaborator

hexaeder commented Jul 4, 2023

Hm maybe that already works if you use nothing instead of automatic?

graphplot(graph; elabels_rotation = DefaultDict(nothing, Edge(1,2) => π/2)

On first glance, it looks like we're handling nothing as automatic in prep_vertex_attributes, prep_edge_attributes and getattr. Of course, the inconsistency between nothing and automatic is not great and should be resolved.

Related question on performance of such containers on discourse: https://discourse.julialang.org/t/vectors-of-unions-between-concrete-type-and-singleton-type/101158

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants