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

Allow vector for linestyle in linesegments #1598

Open
fbanning opened this issue Jan 17, 2022 · 2 comments · Fixed by MakieOrg/GraphMakie.jl#94
Open

Allow vector for linestyle in linesegments #1598

fbanning opened this issue Jan 17, 2022 · 2 comments · Fixed by MakieOrg/GraphMakie.jl#94

Comments

@fbanning
Copy link
Member

It would be cool to be able to pass a vector of linestyles (e.g. [:solid, :dash, [0.3, 0.5, 1.0, 1.0]]) for linesegments. This way the user can separately specify the linestyle of each segment. (The vector would have to have the length of the amount of segments.)

Example
This would allow users to write something like

xs = 1:1:10
ys = sin.(xs)
linesegments(xs, ys, linestyle = [:dash, :solid, :dash, :solid, :dash])

to get output like this (simulated via multiple calls to lines):

Screenshot_20220117_172812

Is this already possible? If not, would you consider this a good addition to Makie?

@fbanning
Copy link
Member Author

fbanning commented Jun 8, 2022

I know that this is probably a pretty niche request but would still dare to bump it once. Would really appreciate an assessment whether or not such an option makes sense for linesegments or if I should work around it with lines. :)

@jkrumbiegel
Copy link
Member

jkrumbiegel commented Jun 10, 2022

I could imagine that GLMakie can't currently work with an array of linestyles (I mean in the shader code). In CairoMakie it would be easy enough to add the option.

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

Successfully merging a pull request may close this issue.

2 participants