DearPyGui icon indicating copy to clipboard operation
DearPyGui copied to clipboard

[Feature] Modify plot data series without having to pass the entire data

Open mwerezak opened this issue 4 years ago • 3 comments

Is your feature request related to a problem? Please describe. Right now, to modify a data series you need to call the add_*_series() function for the type of series and pass it all of the data to overwrite the existing data with.

This can be wasteful if e.g. you are adding just a few data points to a series with 1000s of elements.

Describe the solution you'd like There could be a collection of functions in dearpygui.core that provide the ability to modify an existing data series without having to overwrite everything.

Possible operations to consider adding:

  • Append a single value
  • Insert a single value
  • Delete a single value
  • Append a collection of values
  • Insert a collection of values
  • Delete a range of values

Not all of the operations listed above need to be added, if any of them are impractical or undesirable for whatever reason. Probably the most important one would be to support appending a single value or a collection of values.

mwerezak avatar Mar 22 '21 23:03 mwerezak

It would also be helpful to be able to iterate the data that have already been plotted. Otherwise the user has to keep their own list on the python end, duplicating memory use. Since there may be 1000s of data points, an Iterable would be preferred to returning a list.

mwerezak avatar Mar 23 '21 01:03 mwerezak

Good point!

hoffstadt avatar Mar 23 '21 03:03 hoffstadt

(I should probably create an extra issue here - but its also a bit related to this feature request) When "adding" data to an existing plot by settings the x and y values, the progam will crash (only thing is the exit code 139) took me quite some days to figure out what caused the crash. I took it so much for granted, that this works out of the box. Win11 & WSL & dpg 1.11.1 - I like dpg btw :)

Michael1248 avatar Jun 20 '24 17:06 Michael1248