@@ -1024,9 +1024,11 @@ def _parse_linestyle(style_name, allow_false=False):
1024
1024
# Plot the scaled sections of the curve (changing linestyle)
1025
1025
x_scl = np .ma .masked_where (scale_mask , resp .real )
1026
1026
y_scl = np .ma .masked_where (scale_mask , resp .imag )
1027
- plt .plot (
1028
- x_scl * (1 + curve_offset ), y_scl * (1 + curve_offset ),
1029
- primary_style [1 ], color = c , ** kwargs )
1027
+ if x_scl .count () >= 1 and y_scl .count () >= 1 :
1028
+ plt .plot (
1029
+ x_scl * (1 + curve_offset ),
1030
+ y_scl * (1 + curve_offset ),
1031
+ primary_style [1 ], color = c , ** kwargs )
1030
1032
1031
1033
# Plot the primary curve (invisible) for setting arrows
1032
1034
x , y = resp .real .copy (), resp .imag .copy ()
@@ -1044,10 +1046,11 @@ def _parse_linestyle(style_name, allow_false=False):
1044
1046
# Plot the regular and scaled segments
1045
1047
plt .plot (
1046
1048
x_reg , - y_reg , mirror_style [0 ], color = c , ** kwargs )
1047
- plt .plot (
1048
- x_scl * (1 - curve_offset ),
1049
- - y_scl * (1 - curve_offset ),
1050
- mirror_style [1 ], color = c , ** kwargs )
1049
+ if x_scl .count () >= 1 and y_scl .count () >= 1 :
1050
+ plt .plot (
1051
+ x_scl * (1 - curve_offset ),
1052
+ - y_scl * (1 - curve_offset ),
1053
+ mirror_style [1 ], color = c , ** kwargs )
1051
1054
1052
1055
# Add the arrows (on top of an invisible contour)
1053
1056
x , y = resp .real .copy (), resp .imag .copy ()
0 commit comments