hoffstadt / hoffstadt/DearPyGui
The plot line is not visible at the maximum and minimum y-values
- Dominant language
- C++
- Stars
- 15.6k
- Forks
- 783
- PR merge metrics
- No merged PRs in 30d
Description
## Version of Dear PyGui
Version: 2.0.0
Python: 3.12.9
Operating System: Windows 11
## Issue
The plot line is not visible at the maximum and minimum y-values

```python
import dearpygui.dearpygui as dpg
dpg.create_context()
dpg.create_viewport(title="Simple DearPyGUI Plot", width=600, height=400)
x_data = [0, 1, 2, 3, 4, 5]
y_data = [0, 0, 0, 1, 1, 1]
with dpg.window(label="Plot Example", width=580, height=380):
with dpg.plot(label="Line Plot", height=-1, width=-1):
dpg.add_plot_axis(dpg.mvXAxis, label="X Axis")
y_axis = dpg.add_plot_axis(dpg.mvYAxis, label="Y Axis", tag='yax')
dpg.add_line_series(x_data, y_data, label="Line Series", parent=y_axis)
dpg.setup_dearpygui()
dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context()
```
## Expected behavior

using workaround
```python
if rng := max(y_data)-min(y_data) > 0:
dpg.set_axis_limits('yax', min(y_data)-0.1*rng, max(y_data)+0.1*rng)
```
Contributor guide
Assessment
This issue has not been assessed yet.