hoffstadt / hoffstadt/DearPyGui

Speckled lines with add_line_series and large data sets

Open
#420 6 comments 0 reactions 1 assignee Claimed by @hoffstadt View on GitHub
category: plots priority: high type: bug
Dominant language
C++
Stars
15.6k
Forks
783
PR merge metrics
No merged PRs in 30d

Description

**Version of Dear PyGui:**

Version: 0.6.177

**OS**

Operating System: Windows 10

**My Issue/Question**

When plotting a large data set with add_line_series, there appears to be black pixels speckled on the line.

**To Reproduce**

Steps to reproduce the behavior:
1. Create a plot widget
2. Add a line series to the plot with more than 50,000 data points. (10,000 seems to be the very minimum for this to occur)
3. The plot can be either aliased or anti-aliased. The error occurs in both cases.
4. See error as speckled black dots on the line.

**Expected behavior**

I would expect to see the no speckles and just see a solid line when viewing the whole plot, but I only see a solid line when I zoom in on the line.

**Screenshots/Video**
With 50,000 data points

![50000 points](https://user-images.githubusercontent.com/58435724/103377553-975cf900-4a94-11eb-89cd-49d854710848.png)

With 1,000,000 data points
![1 million data points](https://user-images.githubusercontent.com/58435724/103377621-bcea0280-4a94-11eb-8b6d-df861f4507d4.png)

With 1,000,000 data points and anti-aliasing turned off
![image](https://user-images.githubusercontent.com/58435724/103377993-c9bb2600-4a95-11eb-9e1c-0a0cc8d1b62e.png)

More complex plot with 140,000 data points
![image](https://user-images.githubusercontent.com/58435724/103377674-e30fa280-4a94-11eb-8196-a5b107c55940.png)

**Standalone, minimal, complete and verifiable example:**

```python
from dearpygui.core import *
from dearpygui.simple import *

def callback(sender, data):
x = list(range(0, 1_000_000))
y = list(range(0, 1_000_000))
add_line_series("test_plot", name="big data", x=x, y=y, weight=3)

with window("Tutorial"):
add_button("plot button", callback=callback)
add_plot("test_plot", anti_aliased=True)

start_dearpygui(primary_window="Tutorial")
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.