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

Line plot varying thickness and/or color? #594

Open
clo-yunhee opened this issue Oct 3, 2024 · 1 comment
Open

Line plot varying thickness and/or color? #594

clo-yunhee opened this issue Oct 3, 2024 · 1 comment

Comments

@clo-yunhee
Copy link

clo-yunhee commented Oct 3, 2024

Is there a way to make a line plot that can vary in thickness and/or color with ImPlot as-is?
The idea is to represent confidence with a variation in line thickness or color at each point rather than with a shaded plot
Otherwise do you have any pointers to how I could implement something like that with the internal API?

A potential idea I had was to make something like a sparse heatmap but it seems really overkill and I'm not sure if it would be that much better than making a custom line plot at that point

@keltonhalbert
Copy link

I haven't seen anything regarding varying line thicknesses, but I did port the code from #332 to a local branch of mine for varying color. You're welcome to take a look and see if it helps: https://github.com/keltonhalbert/implot/tree/setcolors.

Presumably, a similar approach could be used for the line primitives to do varying thicknesses.

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