8000 update line properties code for Python 3.8 · python-control/python-control@dd6983e · GitHub
[go: up one dir, main page]

Skip to content

Commit dd6983e

Browse files
committed
update line properties code for Python 3.8
1 parent e098625 commit dd6983e

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

control/tests/timeplot_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,7 @@ def test_combine_traces():
312312
combresp6 = ct.combine_traces([resp1, resp])
313313

314314

315+
@slycotonly
315316
def test_linestyles():
316317
# Check to make sure we can change line styles
317318
sys_mimo = ct.tf2ss(

control/timeplot.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -395,10 +395,11 @@ def _make_line_label(signal_index, signal_labels, trace_index):
395395

396396
# Set up line properties for this output, trace
397397
if len(fmt) == 0:
398-
line_props = \
399-
output_props[i % oprop_len if overlay_signals else 0] | \
400-
trace_props[trace % tprop_len if overlay_traces else 0] | \
401-
kwargs
398+
line_props = output_props[
399+
i % oprop_len if overlay_signals else 0].copy()
400+
line_props.update(
401+
trace_props[trace % tprop_len if overlay_traces else 0])
402+
line_props.update(kwargs)
402403
else:
403404
line_props = kwargs
404405

@@ -418,10 +419,11 @@ def _make_line_label(signal_index, signal_labels, trace_index):
418419

419420
# Set up line properties for this output, trace
420421
if len(fmt) == 0:
421-
line_props = \
422-
input_props[i % iprop_len if overlay_signals else 0] | \
423-
trace_props[trace % tprop_len if overlay_traces else 0] | \
424-
kwargs
422+
line_props = input_props[
423+
i % iprop_len if overlay_signals else 0].copy()
424+
line_props.update(
425+
trace_props[trace % tprop_len if overlay_traces else 0])
426+
line_props.update(kwargs)
425427
else:
426428
line_props = kwargs
427429

0 commit comments

Comments
 (0)
0