From 63cbe65b45b22aa316be07b4893d7cb30eb02189 Mon Sep 17 00:00:00 2001
From: Blaise Li <blaise.li__git@nsup.org>
Date: Fri, 16 Mar 2018 15:08:32 +0100
Subject: [PATCH] Data in plot_lfc_distribution is a Series.

---
 libhts/libhts.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libhts/libhts.py b/libhts/libhts.py
index 9b901e2..ff1641d 100644
--- a/libhts/libhts.py
+++ b/libhts/libhts.py
@@ -454,10 +454,12 @@ def plot_lfc_distribution(res, contrast, fold_type=None):
     if fold_type is None:
         fold_type = "log2FoldChange"
     lfc = getattr(res, fold_type).dropna()
-    lfc.name = contrast
     usetex = mpl.rcParams.get("text.usetex", False)
     if usetex:
-        lfc.columns = [texscape(colname) for colname in lfc.columns]
+        lfc.name = texscape(contrast)
+    else:
+        lfc.name = contrast
+        # lfc.columns = [texscape(colname) for colname in lfc.columns]
     axis = sns.kdeplot(lfc)
     axis.set_xlabel(fold_type)
     axis.set_ylabel("frequency")
-- 
GitLab