|
19 | 19 |
|
20 | 20 | from . import config |
21 | 21 | from .bdalg import feedback |
22 | | -from .ctrlplot import ControlPlot, _add_arrows_to_line2D, _ctrlplot_rcParams, \ |
23 | | - _find_axes_center, _get_line_labels, _make_legend_labels, \ |
24 | | - _process_ax_keyword, _process_legend_keywords, _process_line_labels, \ |
25 | | - _update_plot_title |
| 22 | +from .ctrlplot import ControlPlot, _add_arrows_to_line2D, _find_axes_center, \ |
| 23 | + _get_line_labels, _make_legend_labels, _process_ax_keyword, \ |
| 24 | + _process_legend_keywords, _process_line_labels, _update_plot_title |
26 | 25 | from .ctrlutil import unwrap |
27 | 26 | from .exception import ControlMIMONotImplemented |
28 | 27 | from .frdata import FrequencyResponseData |
|
38 | 37 |
|
39 | 38 | # Default values for module parameter variables |
40 | 39 | _freqplot_defaults = { |
41 | | - 'freqplot.rcParams': _ctrlplot_rcParams, |
42 | 40 | 'freqplot.feature_periphery_decades': 1, |
43 | 41 | 'freqplot.number_of_samples': 1000, |
44 | 42 | 'freqplot.dB': False, # Plot gain in dB |
@@ -186,7 +184,7 @@ def bode_plot( |
186 | 184 | values with no plot. |
187 | 185 | rcParams : dict |
188 | 186 | Override the default parameters used for generating plots. |
189 | | - Default is set by config.default['freqplot.rcParams']. |
| 187 | + Default is set by config.default['ctrlplot.rcParams']. |
190 | 188 | show_legend : bool, optional |
191 | 189 | Force legend to be shown if ``True`` or hidden if ``False``. If |
192 | 190 | ``None``, then show legend when there is more than one line on an |
@@ -251,8 +249,7 @@ def bode_plot( |
251 | 249 | 'freqplot', 'wrap_phase', kwargs, _freqplot_defaults, pop=True) |
252 | 250 | initial_phase = config._get_param( |
253 | 251 | 'freqplot', 'initial_phase', kwargs, None, pop=True) |
254 | | - rcParams = config._get_param( |
255 | | - 'freqplot', 'rcParams', kwargs, _freqplot_defaults, pop=True) |
| 252 | + rcParams = config._get_param('ctrlplot', 'rcParams', kwargs, pop=True) |
256 | 253 | title_frame = config._get_param( |
257 | 254 | 'freqplot', 'title_frame', kwargs, _freqplot_defaults, pop=True) |
258 | 255 |
|
@@ -1026,7 +1023,6 @@ def gen_zero_centered_series(val_min, val_max, period): |
1026 | 1023 | # Generate the label, if needed |
1027 | 1024 | if show_legend == True or len(labels) > 1: |
1028 | 1025 | with plt.rc_context(rcParams): |
1029 | | - print(f"{lines=}, {labels=}") |
1030 | 1026 | legend_array[i, j] = ax.legend( |
1031 | 1027 | lines, labels, loc=legend_map[i, j]) |
1032 | 1028 | else: |
@@ -1706,8 +1702,7 @@ def nyquist_plot( |
1706 | 1702 | 'nyquist', 'max_curve_magnitude', kwargs, _nyquist_defaults, pop=True) |
1707 | 1703 | max_curve_offset = config._get_param( |
1708 | 1704 | 'nyquist', 'max_curve_offset', kwargs, _nyquist_defaults, pop=True) |
1709 | | - rcParams = config._get_param( |
1710 | | - 'freqplot', 'rcParams', kwargs, _freqplot_defaults, pop=True) |
| 1705 | + rcParams = config._get_param('ctrlplot', 'rcParams', kwargs, pop=True) |
1711 | 1706 | start_marker = config._get_param( |
1712 | 1707 | 'nyquist', 'start_marker', kwargs, _nyquist_defaults, pop=True) |
1713 | 1708 | start_marker_size = config._get_param( |
@@ -2319,8 +2314,7 @@ def singular_values_plot( |
2319 | 2314 | 'freqplot', 'Hz', kwargs, _freqplot_defaults, pop=True) |
2320 | 2315 | grid = config._get_param( |
2321 | 2316 | 'freqplot', 'grid', kwargs, _freqplot_defaults, pop=True) |
2322 | | - rcParams = config._get_param( |
2323 | | - 'freqplot', 'rcParams', kwargs, _freqplot_defaults, pop=True) |
| 2317 | + rcParams = config._get_param('ctrlplot', 'rcParams', kwargs, pop=True) |
2324 | 2318 | title_frame = config._get_param( |
2325 | 2319 | 'freqplot', 'title_frame', kwargs, _freqplot_defaults, pop=True) |
2326 | 2320 |
|
|
0 commit comments