pal=pkws.pal_b, xlim=pkws.lineplot_xlim, ylim=params.shift_lim, xticks=[0, 150], pkws=pkws) for ax in ax_c: ax.set_yticks([ax.get_yticks()[0], ax.get_yticks()[-1]]) ax.set_yticklabels(["", ""]) ax.tick_params(length=pkws.rc['ytick.major.size'] / 2) ax_c[-1].set_xticklabels(["", ""]) # c: main panel ax_c = fig.add_subplot(gs_c[:, 0]) lineplots.lineplot(lineplots.rf_file_iterator('shift', lp_dists, lp_att_ells, (0, 4, 0), comp_ells=lp_comp_ells), ax_c, line_span=pkws.lineplot_span, rad=30, pal=pkws.pal_b, xlim=pkws.lineplot_xlim, ylim=params.shift_lim, pkws=pkws) ax_c.set_yticks([params.shift_lim[0], 0, params.shift_lim[1]]) ax_c.set_xticks([0, 150]) sns.despine(ax=ax_c, trim=True, offset=5) util.labels(ax_c, pkws.labels.unit_distance, pkws.labels.rf_shift, pkws=pkws) # save plt.savefig(params.output, transparent=True)
# ax_d, cmap = 'coolwarm', vrng = params.size_lim) # util.axis_expand(ax_d, L = 0.2, B = 0.2, R = -0.1, T = 0.05) # util.labels(ax_d, # pkws.labels.image_position.format('Horizontal'), # pkws.labels.image_position.format('Vertical')) # util.colorbar( # fig, ax_d, size_map, ticks = params.size_lim + (1,), # label = pkws.labels.rf_size, label_vofs = -0.03) # panel c : single axis ax_c = fig.add_subplot(gs[1,1]) lineplots.lineplot( lineplots.rf_file_iterator( 'shift', lp_dists, lp_att_ells, (0,4,0), comp_ells = lp_comp_ells), ax_c, line_span = 30, rad = 30, pal = pkws.pal_b, xlim = (0, 180), ylim = params.shift_lim) util.labels(ax_c, pkws.labels.unit_distance, pkws.labels.rf_shift) util.legend( fig, ax_c, pkws.labels.beta, pkws.pal_b, inset = pkws.legend_inset) # panel d : single axis ax_d = fig.add_subplot(gs[1,2]) lineplots.lineplot( lineplots.rf_file_iterator( 'size', lp_dists, lp_att_ells, (0,4,0), comp_ells = lp_comp_ells),
fig = plt.figure(constrained_layout=False, figsize=[s * cm for s in params.total_size]) # make gridspec gs = gridspec.GridSpec( nrows=1, ncols=1, figure=fig, ) ax_e = fig.add_subplot(gs[0, 0]) lineplots.lineplot(lineplots.gain_file_iterator(lp_dists, sgain_focl, (0, 4, 0), gain_comp=sgain_comp), ax_e, line_span=pkws.lineplot_span, rad=30, pal=pkws.pal_b, xlim=(0, 180), ylim=params.gain_lim, pkws=pkws) util.labels(ax_e, pkws.labels.unit_distance, pkws.labels.effective_gain, pkws=pkws) util.legend(fig, ax_e, pkws.labels.beta, pkws.pal_b, inset=pkws.legend_inset, pkws=pkws) ax_e.set_yticks([1, params.gain_lim[1]])
util.axis_expand(ax_c, L = 0.1, B = 0.1, R = 0, T = 0) util.labels(ax_c, pkws.labels.feat_map_position.format('Horizontal'), pkws.labels.feat_map_position.format('Vertical')) util.colorbar( fig, ax_c, r2_mappable, ticks = [0.6, 1.], label = pkws.labels.feature_r2,) # ---------------- middle row ---- # panel d ax_d = fig.add_subplot(gs[1, 0]) lineplots.lineplot( lineplots.rf_layer_iterator( 'shift', lp_dists, lp_att_ells[params.layer_plot_file]), ax_d, line_span = pkws.lineplot_span, rad = 30, pal = pkws.pal_l, xlim = pkws.layerplot_xlim, ylim = params.shift_lim) util.labels(ax_d, pkws.labels.unit_distance, pkws.labels.rf_shift) util.legend(fig, ax_d, pkws.labels.layer, pkws.pal_l, inset = 0.08) # panel e ax_e = fig.add_subplot(gs[1, 1]) lineplots.lineplot( lineplots.rf_layer_iterator( 'size', lp_dists, lp_att_ells[params.layer_plot_file]), ax_e, line_span = pkws.lineplot_span, rad = 30, pal = pkws.pal_l, xlim = pkws.layerplot_xlim, ylim = params.size_lim) #ylim = pkws.small_size_ylim util.labels(ax_e, pkws.labels.unit_distance, pkws.labels.rf_size)