hoffstadt / hoffstadt/DearPyGui

Different initial zoom on two identical plots

Open
#2,356 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.11.2
Operating System: Windows

## My Issue/Question

With two identical plots, put one after another in the same window, each containing a pie series built from the same data, DPG shows them with different scales. It only happens when `equal_aspects` is True.

I'm not sure if it's something in DPG or in ImPlot.

## To Reproduce

Steps to reproduce the behavior:
1. Run the script below.

## Expected behavior

Identical behavior of identical plots.

## Screenshots/Video

![image](https://github.com/hoffstadt/DearPyGui/assets/104593001/c8264ebf-65b0-4b88-9bfe-6bf932e7107a)

## Standalone, minimal, complete and verifiable example

```python
import dearpygui.dearpygui as dpg

dpg.create_context()
dpg.create_viewport(title=f"Test - {dpg.get_dearpygui_version()}", width=700, height=700)

with dpg.window():
dpg.set_primary_window(dpg.last_item(), True)

values = [1, 1, 2, 3, 5]
labels = ["A", "B", "C", "D", "E"]

with dpg.plot(label="Regular pie", width=-1, height=300, equal_aspects=True):
dpg.add_plot_legend()
dpg.add_plot_axis(dpg.mvXAxis, label="x")
with dpg.plot_axis(dpg.mvYAxis, label="y"):
dpg.add_pie_series(0.5, 0.5, 0.5, values, labels, normalize=True, format="%.0f")

with dpg.plot(label="Regular pie", width=-1, height=300, equal_aspects=True):
dpg.add_plot_legend()
dpg.add_plot_axis(dpg.mvXAxis, label="x")
with dpg.plot_axis(dpg.mvYAxis, label="y"):
dpg.add_pie_series(0.5, 0.5, 0.5, values, labels, normalize=True, format="%.0f")

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.