diff --git a/scripts/hist2d.py b/scripts/hist2d.py index f8aea0a..a1a9767 100644 --- a/scripts/hist2d.py +++ b/scripts/hist2d.py @@ -6,8 +6,8 @@ import pandas as pd import numpy as np -import matplotlib -matplotlib.use("Agg") +# import matplotlib +# matplotlib.use("Agg") from matplotlib.colors import LogNorm import matplotlib.pyplot as plt @@ -38,7 +38,6 @@ def scale_format(value): def draw_hist2d(argv): - MIN_MAF = 0.0003 ax = plt.gca() data = pd.read_table(argv[0]) @@ -65,9 +64,6 @@ def draw_hist2d(argv): max_a = max([max(np.log10(x)), max(np.log10(y))]) ax.plot([min_a, max_a], [min_a, max_a], 'k--', linewidth=1) - ax.set_xlim([np.log10(MIN_MAF), max_a]) - ax.set_ylim([np.log10(MIN_MAF), max_a]) - locs, _ = plt.xticks() # ax.set_xticklabels(['${10}^{%.1f}$'%i for i in locs]) ax.set_xticklabels([scale_format(10 ** i) for i in locs]) @@ -84,10 +80,11 @@ def draw_hist2d(argv): plt.tight_layout() plt.savefig(out_fig_file) - #plt.show() + plt.show() if __name__ == '__main__': - # usage: python hist2d.py basvarc_plot.txt.gz "Real:Basevar" test.pdf - draw_hist2d(sys.argv[1:]) \ No newline at end of file + draw_hist2d(sys.argv[1:]) + +