Skip to content
Snippets Groups Projects
Commit be69982c authored by Tobias Hangleiter's avatar Tobias Hangleiter
Browse files

label only lower ax for shared frequency axes

parent cec662e0
No related branches found
No related tags found
1 merge request!57Various small improvements
......@@ -67,7 +67,7 @@ class PlotManager:
if not any('layout' in key for key in self.figure_kw.keys()):
self.figure_kw['layout'] = 'tight'
if self.subplot_kw.pop('sharex', None) is not None:
if self.subplot_kw.pop('sharex', None) is False:
warnings.warn('sharex in subplot_kw not negotiable, dropping', UserWarning)
self.setup_figure()
......@@ -387,16 +387,18 @@ class PlotManager:
if self.axes['main']['processed'] is None:
self.axes['main']['processed'] = self.fig.add_subplot(gs[:2], **self.subplot_kw)
self.axes['main']['processed'].grid(True)
self.axes['main']['processed'].set_xlabel('$f$ (Hz)')
self.axes['main']['processed'].set_xscale('log')
self.axes['main']['processed'].set_yscale('linear' if self.plot_dB_scale else 'log')
# can change
self.axes['main']['processed'].set_xlabel('$f$ (Hz)' if not self.plot_cumulative else '')
self.axes['main']['processed'].set_ylabel(
_ax_label(self.plot_amplitude, False, self.plot_dB_scale, self.reference_spectrum)
+ _ax_unit(self.plot_amplitude, self.plot_density, False,
self.plot_cumulative_normalized, self.plot_dB_scale,
'dB' if self.plot_dB_scale else self.processed_unit)
)
self.axes['main']['processed'].xaxis.set_tick_params(which="both",
labelbottom=not self.plot_cumulative)
if self.plot_raw:
if self.axes['main']['raw'] is None:
self.axes['main']['raw'] = self.axes['main']['processed'].twinx()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment