hoffstadt / DearPyGui

Dear PyGui: A fast and powerful Graphical User Interface Toolkit for Python with minimal dependencies
https://dearpygui.readthedocs.io/en/latest/
MIT License
12.89k stars 671 forks source link

Improvement of documentation + more examples as code. #1362

Open lorcat opened 2 years ago

lorcat commented 2 years ago

I would like to have more examples in the documentation. In particular I am interested in examples shown in the galery under this link:

  1. drag and drop data, figure #2
  2. sliding data, figure #6 & #7
  3. filled marker size with a line inbetween, figure #10

The code under Color and Styles is a bit ambigious: `# create a theme for the plot with dpg.theme(tag="plot_theme"): with dpg.theme_component(dpg.mvStemSeries): dpg.add_theme_color(dpg.mvPlotCol_Line, (150, 255, 0)) dpg.add_theme_style(dpg.mvPlotStyleVar_Marker, dpg.mvPlotMarker_Diamond, category=dpg.mvThemeCat_Plots) dpg.add_theme_style(dpg.mvPlotStyleVar_MarkerSize, 7, category=dpg.mvThemeCat_Plots)

    with dpg.theme_component(dpg.mvScatterSeries):
        dpg.add_theme_color(dpg.mvPlotCol_Line, (60, 150, 200))
        dpg.add_theme_style(dpg.mvPlotStyleVar_Marker, dpg.mvPlotMarker_Square, category=dpg.mvThemeCat_Plots)
        dpg.add_theme_style(dpg.mvPlotStyleVar_MarkerSize, 4, category=dpg.mvThemeCat_Plots)`

The colors are added to the theme, but in reality - the default colors are used. I tried to change the color code of: dpg.add_theme_color(dpg.mvPlotCol_Line, (60, 150, 200)) to dpg.add_theme_color(dpg.mvPlotCol_Line, (255, 0, 0)) and the color of the symbols is not changed at all - the default colors are displayed.

Describe the solution you'd like I would like to see the code for the examples as source code.

inttex commented 2 years ago

Regarding your second question, "Color and Styles", there has been an update which corrects the following line dpg.add_theme_color(dpg.mvPlotCol_Line, (60, 150, 200)) see https://dearpygui.readthedocs.io/en/latest/documentation/plots.html#colors-and-styles adding "category=dpg.mvThemeCat_Plots" to the line will make it work. -->dpg.add_theme_color(dpg.mvPlotCol_Line, (60, 150, 200), category=dpg.mvThemeCat_Plots)

Pcothren commented 2 years ago

Regarding your second question, "Color and Styles", there has been an update which corrects the following line dpg.add_theme_color(dpg.mvPlotCol_Line, (60, 150, 200)) see https://dearpygui.readthedocs.io/en/latest/documentation/plots.html#colors-and-styles adding "category=dpg.mvThemeCat_Plots" to the line will make it work. -->dpg.add_theme_color(dpg.mvPlotCol_Line, (60, 150, 200), category=dpg.mvThemeCat_Plots)

this has been corrected

we will continue to update the docs overtime to include the examples shown or atleast something close to them