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

Speckled lines with add_line_series and large data sets #420

Open
jkelowitt opened this issue Dec 30, 2020 · 6 comments
Open

Speckled lines with add_line_series and large data sets #420

jkelowitt opened this issue Dec 30, 2020 · 6 comments
Assignees
Labels
category: plots related to plots priority: high high priority type: bug bug

Comments

@jkelowitt
Copy link

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

With 1,000,000 data points
1 million data points

With 1,000,000 data points and anti-aliasing turned off
image

More complex plot with 140,000 data points
image

Standalone, minimal, complete and verifiable example:

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")
@hoffstadt
Copy link
Owner

This appears to be an imgui/implot bug... but I have a fix that we can add in the next release.

I've done some quick test and basically the solution I've come up with is to add flags to allow users to down sample the data based on how many pixels wide the plot is. Basically it makes no sense to actually try to render 1 million points if a plot is only 100 pixels wide.

So the next release will have something like this:

add_line_series("test_plot", name="big data", x=x, y=y, down_sample=True)
@hoffstadt hoffstadt self-assigned this Dec 30, 2020
@hoffstadt hoffstadt added this to the Version 0.7 milestone Jan 2, 2021
@hoffstadt hoffstadt removed this from the Version 0.7 milestone Jun 13, 2021
@hoffstadt hoffstadt removed the 0.6.x label Jun 30, 2021
@hoffstadt hoffstadt added type: bug bug category: plots related to plots priority: medium medium priority and removed bug: implot labels Oct 13, 2021
@smweil
Copy link

smweil commented Mar 9, 2022

Kindly bumping :-) Would be an incredible feature =D

@hoffstadt
Copy link
Owner

Let me bump the priority! This needs to be fixed ASAP.

@hoffstadt hoffstadt added priority: high high priority and removed priority: medium medium priority labels Mar 11, 2022
@maticahacic
Copy link

Is there any ETA for the fix of this problem?

@hoffstadt
Copy link
Owner

We plan on having the plotting backend revamped for 1.7 (similar to how we just did the node backend for 1.6). This would include a fix for this issue!

@Errorhuhn
Copy link

Is there any plan on integrating the automated down sampling in lines and scatters? This would increase performance on big data sets. I havent found anything regarding that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: plots related to plots priority: high high priority type: bug bug
5 participants