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

add_plot_legend no longer displays legend in v1.7.1 and 1.7.2 #1919

Closed
andersop-st opened this issue Oct 21, 2022 · 1 comment
Closed

add_plot_legend no longer displays legend in v1.7.1 and 1.7.2 #1919

andersop-st opened this issue Oct 21, 2022 · 1 comment
Labels
state: ready Fixed/Added and will be present in an upcoming release type: bug bug

Comments

@andersop-st
Copy link

andersop-st commented Oct 21, 2022

Version of Dear PyGui

Version: 1.7.2
Operating System: Windows 10 & Windows 11

My Issue/Question

Usage of the "add_plot_legend", does not display the plot legend.

Note: 'add_plot_legend' was working with 1.7.0.

To Reproduce

The demo application and the example code provided in the documentation are able to reproduce this issue. Sample code from documentation provided below.

Note: Right-click on the plot still works for showing the legend.

Expected behavior

Using 'add_plot_legend' should add the plot legend.

Standalone minimal code

Copied from the documentation example

import dearpygui.dearpygui as dpg
from math import sin

dpg.create_context()

# creating data
sindatax = []
sindatay = []
for i in range(0, 500):
    sindatax.append(i / 1000)
    sindatay.append(0.5 + 0.5 * sin(50 * i / 1000))

with dpg.window(label="Tutorial"):
    # create plot
    with dpg.plot(label="Line Series", height=400, width=400):
        # optionally create legend
        dpg.add_plot_legend()

        # REQUIRED: create x and y axes
        dpg.add_plot_axis(dpg.mvXAxis, label="x")
        dpg.add_plot_axis(dpg.mvYAxis, label="y", tag="y_axis")

        # series belong to a y axis
        dpg.add_line_series(sindatax, sindatay, label="0.5 + 0.5 * sin(x)", parent="y_axis")

dpg.create_viewport(title='Custom Title', width=800, height=600)
dpg.setup_dearpygui()
dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context()
@andersop-st andersop-st added state: pending not addressed yet type: bug bug labels Oct 21, 2022
@hoffstadt hoffstadt added priority: high high priority and removed state: pending not addressed yet labels Oct 22, 2022
@hoffstadt
Copy link
Owner

Fixed in next release.

@hoffstadt hoffstadt added state: ready Fixed/Added and will be present in an upcoming release and removed priority: high high priority labels Oct 22, 2022
hoffstadt added a commit that referenced this issue Oct 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: ready Fixed/Added and will be present in an upcoming release type: bug bug
Projects
None yet
Development

No branches or pull requests

2 participants