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

Different initial zoom on two identical plots #2356

Open
v-ein opened this issue Jul 7, 2024 · 0 comments
Open

Different initial zoom on two identical plots #2356

v-ein opened this issue Jul 7, 2024 · 0 comments
Labels
state: pending not addressed yet type: bug bug

Comments

@v-ein
Copy link
Contributor

v-ein commented Jul 7, 2024

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

Standalone, minimal, complete and verifiable example

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()
@v-ein v-ein added state: pending not addressed yet type: bug bug labels Jul 7, 2024
@v-ein v-ein changed the title Different initial zoom on two identical plots with equal_aspects Different initial zoom on two identical plots Jul 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: pending not addressed yet type: bug bug
Projects
None yet
Development

No branches or pull requests

1 participant