diff --git a/Snakefile b/Snakefile index a04d6cd..ef34b09 100644 --- a/Snakefile +++ b/Snakefile @@ -51,7 +51,6 @@ wildcard_constraints: save_all='|_saveall', gammacorrected='|_gamma-corrected', plot_focus='|_focus-subject|_focus-image', - physio='|_physio-bars', ecc_mask="|_eccmask-[0-9]+", logscale="log|linear", mcmc_model="partially-pooled|unpooled|partially-pooled-interactions-[.0-9]+|partially-pooled-interactions", @@ -2436,13 +2435,13 @@ rule mcmc_performance_comparison_figure: op.join(config['DATA_DIR'], 'dacey_data', 'Dacey1992_mcmc_line-nooffset_step-.1_prob-.8_depth-10_c-4_d-1000_w-1000_s-10.nc'), output: - op.join(config['DATA_DIR'], 'figures', '{context}', 'mcmc{scaling_extended}_{mcmc_model}_{mcmc_plot_type}_{focus}{physio}.{ext}'), + op.join(config['DATA_DIR'], 'figures', '{context}', 'mcmc{scaling_extended}_{mcmc_model}_{mcmc_plot_type}_{focus}.{ext}'), log: op.join(config['DATA_DIR'], 'logs', 'figures', '{context}', - 'mcmc{scaling_extended}_{mcmc_model}_{mcmc_plot_type}_{focus}{physio}_{ext}.log') + 'mcmc{scaling_extended}_{mcmc_model}_{mcmc_plot_type}_{focus}_{ext}.log') benchmark: op.join(config['DATA_DIR'], 'logs', 'figures', '{context}', - 'mcmc{scaling_extended}_{mcmc_model}_{mcmc_plot_type}_{focus}{physio}_{ext}_benchmark.txt') + 'mcmc{scaling_extended}_{mcmc_model}_{mcmc_plot_type}_{focus}_{ext}_benchmark.txt') run: import foveated_metamers as fov import contextlib @@ -2539,7 +2538,7 @@ rule mcmc_performance_comparison_figure: logscale_xaxis=True, increase_size=False) g.fig.canvas.draw() - if 'bars' in wildcards.physio: + if 'physio-bars' in wildcards.focus: fov.plotting.add_physiological_scaling_bars(g.ax, az.from_netcdf(input[-1])) fig = g.fig if 'line' in wildcards.focus: @@ -2660,11 +2659,11 @@ rule performance_comparison_figure: op.join(config['DATA_DIR'], 'dacey_data', 'Dacey1992_mcmc_line-offset_step-.1_prob-.8_depth-10_c-4_d-1000_w-1000_s-10.nc'), output: - op.join(config['DATA_DIR'], 'figures', '{context}', 'performance_{focus}{physio}.svg') + op.join(config['DATA_DIR'], 'figures', '{context}', 'performance_{focus}.svg') log: - op.join(config['DATA_DIR'], 'logs', 'figures', '{context}', 'performance_{focus}{physio}.log') + op.join(config['DATA_DIR'], 'logs', 'figures', '{context}', 'performance_{focus}.log') benchmark: - op.join(config['DATA_DIR'], 'logs', 'figures', '{context}', 'performance_{focus}{physio}_benchmark.txt') + op.join(config['DATA_DIR'], 'logs', 'figures', '{context}', 'performance_{focus}_benchmark.txt') run: import foveated_metamers as fov import pandas as pd @@ -2718,7 +2717,7 @@ rule performance_comparison_figure: style='trial_type', aspect=2 if col is None else 1, logscale_xaxis=logscale_xaxis) - if col is None and 'bars' in wildcards.physio: + if col is None and 'physio-bars' in wildcards.focus: # need to draw so that the following code can check text size g.fig.canvas.draw() fov.plotting.add_physiological_scaling_bars(g.ax, az.from_netcdf(input[-1])) diff --git a/foveated_metamers/plotting.py b/foveated_metamers/plotting.py index adcffb6..1a496a4 100644 --- a/foveated_metamers/plotting.py +++ b/foveated_metamers/plotting.py @@ -1373,7 +1373,9 @@ def lineplot_like_pointplot(data, x, y, col=None, row=None, hue=None, ci=95, # used in pointplot (which uses scatter). I also added an extra factor of # sqrt(2) (by changing the 2 to a 4 in the sqrt below), which looks # necessary - ms = kwargs.pop('markersize', np.sqrt(np.pi * np.square(lw) * 4)) + ms = kwargs.pop('markersize', None) + if ms is None: + ms = np.sqrt(np.pi * np.square(lw) * 4) if ax is None: if col is not None: col_order = kwargs.pop('col_order', sorted(data[col].unique()))