ImSoErgodic / py-upset

A pure-python implementation of the UpSet suite of visualisation methods by Lex, Gehlenborg et al.
313 stars 57 forks source link

Is there any way to handle the size of the output circle #16

Open XINBADA426 opened 7 years ago

XINBADA426 commented 7 years ago

When I use this module to get the result output, it's like this test the circle is too big and is there any methods to adjust it as the examplt in the src?


here is my code:

#!/use/bin/env python
import matplotlib as mpl
mpl.use('Agg')
import pyupset as pyu
import pandas as pd
import sys
import matplotlib.pyplot as plt

sample = {}
with open(sys.argv[1]) as f:
    h = f.readline()
    head = h.split()
    for i in head[1:]:
        sample[i] = 0

frame = {}
df = pd.read_table(sys.argv[1])
for i in sample.keys():
    frame[i] = df[df[i] > 0].iloc[:, 0:1]
    pic = pyu.plot(frame)
plt.savefig(sys.argv[2], dpi=300, pad_inches='tight')
popher commented 6 years ago

As with #17, the quick and dirty solution is to change the source code of the package.

in visualisation.py, go to lines 442 and 443, change s=300 to something like s=100 or s=50... It will be trial and error (if you are running the code ipython/etc, you'll need to reload the kernel to force a reload of the package when you change the source code.)