|
|
@ -208,8 +208,6 @@ class PlotData(object):
|
|
|
|
return res
|
|
|
|
return res
|
|
|
|
|
|
|
|
|
|
|
|
def _plot_children(self, axis, plotflag, kwds):
|
|
|
|
def _plot_children(self, axis, plotflag, kwds):
|
|
|
|
tmp = None
|
|
|
|
|
|
|
|
if not plotflag and self.children is not None:
|
|
|
|
|
|
|
|
axis.hold('on')
|
|
|
|
axis.hold('on')
|
|
|
|
tmp = []
|
|
|
|
tmp = []
|
|
|
|
child_args = kwds.pop('plot_args_children',
|
|
|
|
child_args = kwds.pop('plot_args_children',
|
|
|
@ -232,6 +230,8 @@ class PlotData(object):
|
|
|
|
axis = plt.gca()
|
|
|
|
axis = plt.gca()
|
|
|
|
default_plotflag = self.plot_kwds.get('plotflag')
|
|
|
|
default_plotflag = self.plot_kwds.get('plotflag')
|
|
|
|
plotflag = kwds.get('plotflag', default_plotflag)
|
|
|
|
plotflag = kwds.get('plotflag', default_plotflag)
|
|
|
|
|
|
|
|
tmp = None
|
|
|
|
|
|
|
|
if not plotflag and self.children is not None:
|
|
|
|
tmp = self._plot_children(axis, plotflag, kwds)
|
|
|
|
tmp = self._plot_children(axis, plotflag, kwds)
|
|
|
|
main_args = args if len(args) else tuple(self.plot_args)
|
|
|
|
main_args = args if len(args) else tuple(self.plot_args)
|
|
|
|
main_kwds = dict(self.plot_kwds).copy()
|
|
|
|
main_kwds = dict(self.plot_kwds).copy()
|
|
|
@ -310,6 +310,7 @@ class AxisLabels:
|
|
|
|
def labelfig(self, axis=None):
|
|
|
|
def labelfig(self, axis=None):
|
|
|
|
if axis is None:
|
|
|
|
if axis is None:
|
|
|
|
axis = plt.gca()
|
|
|
|
axis = plt.gca()
|
|
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
return self._labelfig(axis)
|
|
|
|
return self._labelfig(axis)
|
|
|
|
except Exception as err:
|
|
|
|
except Exception as err:
|
|
|
@ -377,6 +378,7 @@ class Plotter_1d(object):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def set_axis(axis, f_max, trans_flag, log_scale):
|
|
|
|
def set_axis(axis, f_max, trans_flag, log_scale):
|
|
|
|
|
|
|
|
if log_scale or (trans_flag == 5 and not log_scale):
|
|
|
|
ax = list(axis.axis())
|
|
|
|
ax = list(axis.axis())
|
|
|
|
if trans_flag == 8 and not log_scale:
|
|
|
|
if trans_flag == 8 and not log_scale:
|
|
|
|
ax[3] = 11 * np.log10(f_max)
|
|
|
|
ax[3] = 11 * np.log10(f_max)
|
|
|
@ -397,7 +399,6 @@ def set_plot_scale(axis, f_max, plotflag):
|
|
|
|
axis.set(**opt)
|
|
|
|
axis.set(**opt)
|
|
|
|
|
|
|
|
|
|
|
|
trans_flag = np.mod(plotflag // 10, 10)
|
|
|
|
trans_flag = np.mod(plotflag // 10, 10)
|
|
|
|
if log_scale or (trans_flag == 5 and not log_scale):
|
|
|
|
|
|
|
|
set_axis(axis, f_max, trans_flag, log_scale)
|
|
|
|
set_axis(axis, f_max, trans_flag, log_scale)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|