# axs[0, 0].text(23, -15, 'External\nRotation', rotation=90, va='top', ha='left', fontsize=10) # add axes titles _, y0, _, h = axs[0, 0].get_position().bounds fig.text(0.5, y0 + h * 1.02, 'Coronal Plane Abduction', ha='center', fontsize=11, fontweight='bold') _, y0, _, h = axs[1, 0].get_position().bounds fig.text(0.5, y0 + h * 1.02, 'Scapular Plane Abduction', ha='center', fontsize=11, fontweight='bold') _, y0, _, h = axs[2, 0].get_position().bounds fig.text(0.5, y0 + h * 1.02, 'Forward Elevation', ha='center', fontsize=11, fontweight='bold') make_interactive() plt.show()
params.scap_lateral, params.dtheta_fine, params.dtheta_coarse, [params.min_elev, params.max_elev], should_clean=False) (db['up_min_ht'], db['up_max_ht'], db['down_min_ht'], db['down_max_ht']) = zip( *(db['up_down_analysis'].apply(extract_up_down_min_max))) plot_utils.init_graphing(params.backend) plot_dirs = [['ht', 'ht_isb', 'HT'], ['gh', 'gh_isb', 'GH'], ['st', 'st_isb', 'ST']] for plot_dir in plot_dirs: traj = db.loc['U35_002_SA_t01', plot_dir[0]] traj_euler = getattr(traj, 'euler') fig = plt.figure(figsize=(14, 7), tight_layout=True) ax = fig.subplots(2, 3) for i in range(3): ax[0, i].plot(np.rad2deg(getattr(traj_euler, plot_dir[1])[:, i])) ax[1, i].plot(traj.pos[:, i]) if i == 0: plot_utils.style_axes(ax[0, i], None, 'Orientation (deg)') plot_utils.style_axes(ax[1, i], 'Frame Index (Zero-Based)', 'Position (mm)') else: plot_utils.style_axes(ax[0, i], None, None) plot_utils.style_axes(ax[1, i], 'Frame Index (Zero-Based)', None) fig.suptitle(plot_dir[2]) plot_utils.make_interactive() plt.show()