File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -144,6 +144,11 @@ def update_chirp_length_units(index):
144144 self .chirp_length .min = clp .MIN_CHIRP_LENGTH
145145 self .chirp_length .max = clp .MAX_CHIRP_LENGTH
146146 self .chirp_length .set_value (clp .project ['chirp_length' ])
147+
148+ # workaround for X range not being set when data is too small and downsampling is being used https://github.com/pyqtgraph/pyqtgraph/issues/2328
149+ x_range = chirp_tab .graph .getViewBox ().viewRange ()[0 ]
150+ chirp_tab .graph .setXRange (x_range [0 ]/ clp .project ['sample_rate' ],x_range [1 ]/ clp .project ['sample_rate' ])
151+ chirp_tab .graph .enableAutoRange (axis = 'x' )
147152 else :
148153 self .chirp_length .min = clp .MIN_CHIRP_LENGTH * clp .project ['sample_rate' ]
149154 self .chirp_length .max = clp .MAX_CHIRP_LENGTH * clp .project ['sample_rate' ]
You can’t perform that action at this time.
0 commit comments