diff options
author | sara <sara.halter@gmx.ch> | 2021-11-11 20:05:40 +0100 |
---|---|---|
committer | sara <sara.halter@gmx.ch> | 2021-11-11 20:05:40 +0100 |
commit | 1e873c7ec474b1af4082aafcd33c0ba7a9fd3d51 (patch) | |
tree | 98e592e42f27ec2a6bd1db689fc1b4196b4c7573 /src/Test_Plots/test2_axis_limis.py | |
parent | FIR/Fading implementiert (diff) | |
parent | Create ZMQ test (diff) | |
download | Fading-1e873c7ec474b1af4082aafcd33c0ba7a9fd3d51.tar.gz Fading-1e873c7ec474b1af4082aafcd33c0ba7a9fd3d51.zip |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'src/Test_Plots/test2_axis_limis.py')
-rw-r--r-- | src/Test_Plots/test2_axis_limis.py | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/src/Test_Plots/test2_axis_limis.py b/src/Test_Plots/test2_axis_limis.py deleted file mode 100644 index bdfeda1..0000000 --- a/src/Test_Plots/test2_axis_limis.py +++ /dev/null @@ -1,40 +0,0 @@ -import dearpygui.dearpygui as dpg -from math import sin, cos - -dpg.create_context() - -sindatax = [] -sindatay = [] -for i in range(0, 500): - sindatax.append(i / 1000) - sindatay.append(0.5 + 0.5 * sin(50 * i / 1000)) - -def update_series(): - - cosdatax = [] - cosdatay = [] - for i in range(0, 500): - cosdatax.append(i / 1000) - cosdatay.append(0.5 + 0.5 * cos(50 * i / 1000)) - dpg.set_value('series_tag', [cosdatax, cosdatay]) - dpg.set_item_label('series_tag', "0.5 + 0.5 * cos(x)") - -with dpg.window(label="Tutorial", tag="win"): - dpg.add_button(label="Update Series", callback=update_series) - # 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", tag="series_tag") - -dpg.create_viewport(title='Custom Title', width=800, height=600) -dpg.setup_dearpygui() -dpg.show_viewport() -dpg.start_dearpygui() -dpg.destroy_context() |