epezent / epezent/implot

Pixel gaps in line plots

Open
#447 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
6.2k
Forks
693
PR merge metrics
No merged PRs in 30d

Description

I'm drawing `ImPlot::PlotLineG` with a width of about 4 here.
At each kink there are small gaps like here:
![Screenshot_20230208_174355](https://user-images.githubusercontent.com/44261477/217600998-5d813625-10f7-46b0-9dfc-08a4c320d37a.png)
The problem gets worse when points are very close together (and the gaps flicker on moving)
here I draw about 1 point per pixel
![Screenshot_20230208_180143](https://user-images.githubusercontent.com/44261477/217601314-5a08e034-10e8-4639-bd43-6342c01d9e7e.png)

As I workaround, I added a scatter plot of points over the lines - see the red line in the last picture - looks much better
I wonder if something like this could be done in the original PlotLine

I just checked that the same pixels appear when using the original `ImGui::PlotLines` with width 4.0f hacked in

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.