Commit eed9eae4 authored by Blaise Li's avatar Blaise Li
Browse files

Log-scaled axes in paired scatterplots.

parent 849375f5
......@@ -473,7 +473,7 @@ def plot_scatter(data,
x=x_column, y=y_column, s=1, c=group2colour[status],
label=f"{status} ({len(group)})", ax=ax)
else:
# Apply a coulour to a list of genes
# Apply a colour to a list of genes
(status, colour) = group2colour
row_indices = data.index.intersection(grouping)
try:
......@@ -507,11 +507,15 @@ def plot_scatter(data,
ax.set_ylim(y_range)
return ax
def plot_paired_scatters(data, columns=None, hue=None):
def plot_paired_scatters(data, columns=None, hue=None, log_log=False):
"""Alternative to pairplot, in order to avoid histograms on the diagonal."""
if columns is None:
columns = data.columns
g = sns.PairGrid(data, vars=columns, hue=hue, size=8)
#g.map_offdiag(plt.scatter, marker=".")
g.map_lower(plt.scatter, marker=".")
if log_log:
for ax in g.axes.ravel():
ax.set_xscale('log')
ax.set_yscale('log')
g.add_legend()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment