diff options
author | Nao Pross <np@0hm.ch> | 2021-12-11 14:08:50 +0100 |
---|---|---|
committer | Nao Pross <np@0hm.ch> | 2021-12-11 14:08:50 +0100 |
commit | 3719288b70e42fb2adf0e3a317e8b2c73e7d4c0e (patch) | |
tree | 812d73bd351621e4ed5cfe363e8609e84e45706c /tests/dearpygui/test.py | |
parent | Correctly decode symbols (diff) | |
download | Fading-3719288b70e42fb2adf0e3a317e8b2c73e7d4c0e.tar.gz Fading-3719288b70e42fb2adf0e3a317e8b2c73e7d4c0e.zip |
Delete old stuff
Diffstat (limited to '')
-rw-r--r-- | tests/dearpygui/test.py | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/tests/dearpygui/test.py b/tests/dearpygui/test.py deleted file mode 100644 index 3fb0d51..0000000 --- a/tests/dearpygui/test.py +++ /dev/null @@ -1,57 +0,0 @@ -import dearpygui.dearpygui as dpg -from math import sin - -import qpks as qp - -q = qp.qpsk_nogui() - -dpg.create_context() - -# data = q.analog_random_source_x_0 - -sindatax = [] -sindatay = [] -for i in range(0, 100): - sindatax.append(i / 100) - sindatay.append(0.5 + 0.5 * sin(50 * i / 100)) -sindatay2 = [] -for i in range(0, 100): - sindatay2.append(2 + 0.5 * sin(50 * i / 100)) - -with dpg.window(label="Tutorial", width=500, height=400): - # 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), category=dpg.mvThemeCat_Plots) - 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), category=dpg.mvThemeCat_Plots) - 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) - - # create plot - with dpg.plot(tag="plot", label="Line Series", height=-1, width=-1): - - # 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="yaxis") - - # series belong to a y axis - # dpg.add_stem_series(data, sindatay, label="Source", parent="yaxis", tag="series_data") - dpg.add_stem_series(sindatax, sindatay, label="0.5 + 0.5 * sin(x)", parent="yaxis", tag="series_data") - dpg.add_scatter_series(sindatax, sindatay2, label="2 + 0.5 * sin(x)", parent="yaxis", tag="series_data2") - - # apply theme to series - dpg.bind_item_theme("series_data", "plot_theme") - dpg.bind_item_theme("series_data2", "plot_theme") - -dpg.create_viewport(title='Custom Title', width=800, height=600) -dpg.setup_dearpygui() -dpg.show_viewport() -dpg.start_dearpygui() -dpg.destroy_context()
\ No newline at end of file |