hoffstadt / hoffstadt/DearPyGui

Error series with same label as series not linked to it

Open
#1,956 0 comments 0 reactions 0 assignees View on GitHub
state: pending type: bug
Dominant language
C++
Stars
15.6k
Forks
783
PR merge metrics
No merged PRs in 30d

Description

## Version of Dear PyGui

Version: 1.8.0
Operating System: Ubuntu 22.04.1 LTS (same behaviour was observed on Fedora 36)

## My Issue/Question

If my understanding is right, using `add_error_series` with the same `label` as another series, such as a line series, will 'link' that error series to the line (for example they should have the same color). However, this is not what happens : the error series is white (and not of the color of the lines series), and the series label shows up two times in the legend. This happens when using the dpg demo (using `show_demo`), but not when using the implot demo directly (using `show_implot_demo`), hinting at a problem with dpg.

## To Reproduce

1. Create a plot, an x and a y axis
2. Add a line series to that y axis with a certain label (for example "Line")
3. Add an error series with the same label as the line series
4. Optionally, add a plot legend

## Expected behavior

The error series should be of the same color as the line series. The series name show only once in the plot legend. The observed behaviour show that the two series are not linked together but, in fact, independant.

## Screenshots/Video

Observed behaviour:

![Observed behaviour](https://user-images.githubusercontent.com/16176966/203372746-23f7acec-f8a6-4b1a-a500-dbba6e2641a1.jpg)

## Standalone, minimal, complete and verifiable example

```python
import dearpygui.dearpygui as dpg

dpg.create_context()
dpg.create_viewport()

error1_x = [1.0, 2.0, 3.0, 4.0]
error1_y = error1_x
error1_neg = [1.0, 1.0, 1.0, 1.0]
error1_pos = error1_neg

with dpg.window():
with dpg.plot(label="Error Series", height=400, width=-1):
dpg.add_plot_legend()
xaxis = dpg.add_plot_axis(dpg.mvXAxis, label="x")
with dpg.plot_axis(dpg.mvYAxis, label="y"):

dpg.add_line_series(error1_x, error1_y, label="Line")
dpg.add_error_series(
error1_x, error1_y, error1_neg, error1_pos, label="Line"
)
dpg.fit_axis_data(dpg.top_container_stack())
dpg.fit_axis_data(xaxis)

dpg.setup_dearpygui()
dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context()
```

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.