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

Trying to fix plot labels.

parent 9ee746cf
......@@ -1312,16 +1312,16 @@ rule make_MA_plot:
else:
grouping = params.id_list
group2colour = (wildcards.id_list, sns.xkcd_rgb["orange"])
title = f"MA-plot for {wildcards.contrast}, {wildcards.orientation}_{wildcards.biotype}"
if mpl.rcParams.get("text.usetex", False):
title = texscape(title)
save_plot(
output.MA_plot, plot_MA, res,
grouping=grouping,
group2colour=group2colour,
lfc_range = params.lfc_range,
fold_type = "log2FoldChange",
title="MA-plot for %s, %s_%s" % (
wildcards.contrast,
wildcards.orientation,
wildcards.biotype))
lfc_range=params.lfc_range,
fold_type="log2FoldChange",
title=title)
##################
......
......@@ -4164,7 +4164,7 @@ def plot_logo(data, ylabel):
letter2legend = dict(zip("ACGTN", "ACGTN"))
usetex = mpl.rcParams.get("text.usetex", False)
if usetex:
ylabel = sub("_", r"\_", ylabel)
ylabel = texscape(ylabel)
for (read_len, rel_heights) in data.mul(information, axis=0).iterrows():
y_base = 0
for (letter, rel_height) in rel_heights.sort_values().iteritems():
......
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