@@ -111,8 +111,7 @@ def nichols_plot(sys_list, omega=None, grid=True):
111
111
nichols_grid ()
112
112
113
113
114
- # TODO: Consider making line style configurable
115
- def nichols_grid (cl_mags = None , cl_phases = None ):
114
+ def nichols_grid (cl_mags = None , cl_phases = None , line_style = 'dotted' ):
116
115
"""Nichols chart grid
117
116
118
117
Plots a Nichols chart grid on the current axis, or creates a new chart
@@ -126,6 +125,8 @@ def nichols_grid(cl_mags=None, cl_phases=None):
126
125
cl_phases : array-like (degrees), optional
127
126
Array of closed-loop phases defining the iso-phase lines on a custom
128
127
Nichols chart. Must be in the range -360 < cl_phases < 0
128
+ line_style : string, optional
129
+ .. seealso:: https://matplotlib.org/gallery/lines_bars_and_markers/linestyles.html
129
130
130
131
Returns
131
132
-------
@@ -192,10 +193,10 @@ def nichols_grid(cl_mags=None, cl_phases=None):
192
193
193
194
for phase_offset in phase_offsets :
194
195
# Draw M and N contours
195
- plt .plot (m_phase + phase_offset , m_mag , color = 'gray ' ,
196
- linestyle = 'dotted' , zorder = 0 )
197
- plt .plot (n_phase + phase_offset , n_mag , color = 'gray ' ,
198
- linestyle = 'dotted' , zorder = 0 )
196
+ plt .plot (m_phase + phase_offset , m_mag , color = 'lightgray ' ,
197
+ linestyle = line_style , zorder = 0 )
198
+ plt .plot (n_phase + phase_offset , n_mag , color = 'lightgray ' ,
199
+ linestyle = line_style , zorder = 0 )
199
200
200
201
# Add magnitude labels
201
202
for x , y , m in zip (m_phase [:][- 1 ] + phase_offset , m_mag [:][- 1 ], cl_mags ):
0 commit comments