<p dir="auto">Hello,</p>
<p dir="auto">I am using seaborn 0.11.2 trying to plot some partial correlations using <code class="notranslate">regplot</code>. I have a dataframe for all of my data (x,y, and covariates), and a list of columne names (e.g. <code class="notranslate">covars=["Covar1","Covar2"..."CovarN"]</code>) that I want to pass into the <code class="notranslate">y_partial</code> argument. If I type I only pass in one name into the argument, the code runs. However, if I pass <code class="notranslate">y_partial = covars</code> to try to regress out all the covariates, I get the following error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/om2/user/smeisler/anaconda3/envs/nipype/lib/python3.8/site-packages/seaborn/_decorators.py in inner_f(*args, **kwargs)
     44             )
     45         kwargs.update({k: arg for k, arg in zip(sig.parameters, args)})
---&gt; 46         return f(**kwargs)
     47     return inner_f
     48 

/om2/user/smeisler/anaconda3/envs/nipype/lib/python3.8/site-packages/seaborn/regression.py in regplot(x, y, data, x_estimator, x_bins, x_ci, scatter, fit_reg, ci, n_boot, units, seed, order, logistic, lowess, robust, logx, x_partial, y_partial, truncate, dropna, x_jitter, y_jitter, label, color, marker, scatter_kws, line_kws, ax)
    849 ):
    850 
--&gt; 851     plotter = _RegressionPlotter(x, y, data, x_estimator, x_bins, x_ci,
    852                                  scatter, fit_reg, ci, n_boot, units, seed,
    853                                  order, logistic, lowess, robust, logx,

/om2/user/smeisler/anaconda3/envs/nipype/lib/python3.8/site-packages/seaborn/regression.py in __init__(self, x, y, data, x_estimator, x_bins, x_ci, scatter, fit_reg, ci, n_boot, units, seed, order, logistic, lowess, robust, logx, x_partial, y_partial, truncate, dropna, x_jitter, y_jitter, color, label)
    112         # Drop null observations
    113         if dropna:
--&gt; 114             self.dropna(&quot;x&quot;, &quot;y&quot;, &quot;units&quot;, &quot;x_partial&quot;, &quot;y_partial&quot;)
    115 
    116         # Regress nuisance variables out of the data

/om2/user/smeisler/anaconda3/envs/nipype/lib/python3.8/site-packages/seaborn/regression.py in dropna(self, *vars)
     60         vals = [getattr(self, var) for var in vars]
     61         vals = [v for v in vals if v is not None]
---&gt; 62         not_na = np.all(np.column_stack([pd.notnull(v) for v in vals]), axis=1)
     63         for var in vars:
     64             val = getattr(self, var)

&lt;__array_function__ internals&gt; in column_stack(*args, **kwargs)

/om2/user/smeisler/anaconda3/envs/nipype/lib/python3.8/site-packages/numpy/lib/shape_base.py in column_stack(tup)
    654             arr = array(arr, copy=False, subok=True, ndmin=2).T
    655         arrays.append(arr)
--&gt; 656     return _nx.concatenate(arrays, 1)
    657 
    658 

&lt;__array_function__ internals&gt; in concatenate(*args, **kwargs)

ValueError: all the input array dimensions for the concatenation axis must match exactly, but along dimension 0, the array at index 0 has size 162 and the array at index 2 has size 4"><pre class="notranslate"><code class="notranslate">/om2/user/smeisler/anaconda3/envs/nipype/lib/python3.8/site-packages/seaborn/_decorators.py in inner_f(*args, **kwargs)
     44             )
     45         kwargs.update({k: arg for k, arg in zip(sig.parameters, args)})
---&gt; 46         return f(**kwargs)
     47     return inner_f
     48 

/om2/user/smeisler/anaconda3/envs/nipype/lib/python3.8/site-packages/seaborn/regression.py in regplot(x, y, data, x_estimator, x_bins, x_ci, scatter, fit_reg, ci, n_boot, units, seed, order, logistic, lowess, robust, logx, x_partial, y_partial, truncate, dropna, x_jitter, y_jitter, label, color, marker, scatter_kws, line_kws, ax)
    849 ):
    850 
--&gt; 851     plotter = _RegressionPlotter(x, y, data, x_estimator, x_bins, x_ci,
    852                                  scatter, fit_reg, ci, n_boot, units, seed,
    853                                  order, logistic, lowess, robust, logx,

/om2/user/smeisler/anaconda3/envs/nipype/lib/python3.8/site-packages/seaborn/regression.py in __init__(self, x, y, data, x_estimator, x_bins, x_ci, scatter, fit_reg, ci, n_boot, units, seed, order, logistic, lowess, robust, logx, x_partial, y_partial, truncate, dropna, x_jitter, y_jitter, color, label)
    112         # Drop null observations
    113         if dropna:
--&gt; 114             self.dropna("x", "y", "units", "x_partial", "y_partial")
    115 
    116         # Regress nuisance variables out of the data

/om2/user/smeisler/anaconda3/envs/nipype/lib/python3.8/site-packages/seaborn/regression.py in dropna(self, *vars)
     60         vals = [getattr(self, var) for var in vars]
     61         vals = [v for v in vals if v is not None]
---&gt; 62         not_na = np.all(np.column_stack([pd.notnull(v) for v in vals]), axis=1)
     63         for var in vars:
     64             val = getattr(self, var)

&lt;__array_function__ internals&gt; in column_stack(*args, **kwargs)

/om2/user/smeisler/anaconda3/envs/nipype/lib/python3.8/site-packages/numpy/lib/shape_base.py in column_stack(tup)
    654             arr = array(arr, copy=False, subok=True, ndmin=2).T
    655         arrays.append(arr)
--&gt; 656     return _nx.concatenate(arrays, 1)
    657 
    658 

&lt;__array_function__ internals&gt; in concatenate(*args, **kwargs)

ValueError: all the input array dimensions for the concatenation axis must match exactly, but along dimension 0, the array at index 0 has size 162 and the array at index 2 has size 4
</code></pre></div>
<p dir="auto">Do you know how I could solve this problem?</p>
<p dir="auto">Thank you,<br>
Steven</p>
<p dir="auto">I'm plotting interaction effects with regplot. I want to take into account two confounding variables.<br>
The documentation of regplot indicates the possibility of passing a list of string for x_partial.<br>
{x, y}_partial : matrix or string(s) , optional<br>
Matrix with same first dimension as <code class="notranslate">x</code>, or column name(s) in <code class="notranslate">data</code>.<br>
These variables are treated as confounding and are removed from<br>
the <code class="notranslate">x</code> or <code class="notranslate">y</code> variables before plotting.</p>
<p dir="auto">However, I am a getting an error "ValueError: all the input array dimensions except for the concatenation axis must match exactly" in linearmodels.py/regplot</p>
<p dir="auto">seaborn/linearmodels.pyc in regplot(x, y, data, x_estimator, x_bins, x_ci, scatter, fit_reg, ci, n_boot, units, order, logistic, lowess, robust, logx, x_partial, y_partial, truncate, dropna, x_jitter, y_jitter, xlabel, ylabel, label, color, marker, scatter_kws, line_kws, ax)<br>
1185                                  order, logistic, lowess, robust, logx,<br>
1186                                  x_partial, y_partial, truncate, dropna,<br>
-&gt; 1187                                  x_jitter, y_jitter, color, label)</p>
<p dir="auto">Is the feature not implemented or am I missing something here?</p>
<p dir="auto">thank you</p>