Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Blaise LI
libhts
Commits
eed9eae4
Commit
eed9eae4
authored
Jan 30, 2018
by
Blaise Li
Browse files
Log-scaled axes in paired scatterplots.
parent
849375f5
Changes
1
Hide whitespace changes
Inline
Side-by-side
libhts/libhts.py
View file @
eed9eae4
...
...
@@ -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 co
u
lour 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
()
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment