Question: NameError: global name 'xticks' is not defined in graphlan_lib.py while running GraPhlAn
0
gravatar for cvu
3.6 years ago by
cvu130
India
cvu130 wrote:

Hello,

i have generated some results through HumanN and now i'm trying to visualise it using GraPhlAn. 

graphlan_annotate.py --annot 04b-hit-keg-mpt-cop-nul-nve-nve-graphlan_rings.txt 04b-hit-keg-mpt-cop-nul-nve-nve-graphlan_tree.txt output.xml

i'm running above command and it's running correctly and i'm getting output.xml.

graphlan.py output.xml image.png --dpi 150 --size 7

while running this, i'm getting error 

UserWarning:  This call to matplotlib.use() has no effect
because the the backend has already been chosen; 
matplotlib.use() must be called *before* pylab, matplotlib.pyplot, 
or matplotlib.backends is imported for the first time. 
  if warn: warnings.warn(_use_error_msg) 
Traceback (most recent call last): 
  File "graphlan.py", line 70, in <module> 
    external_legends = args['external_legends']) 
  File "/home/hd3/metagenomics_tools/graphlan/src/graphlan_lib.py", line 855, in draw 
    xticks([]) 
NameError: global name 'xticks' is not defined

 

any help would be appreciated !

thanks !! 

ADD COMMENTlink modified 3.6 years ago • written 3.6 years ago by cvu130

Whats the output of following commands ?

python -c 'import matplotlib; xticks([])'
python -c 'import matplotlib.pyplot as plt; plt.xticks([])'

It may be version dependent. Check if you have same version of matplotlib required.

python -c 'import matplotlib; print matplotlib.__version__'
ADD REPLYlink modified 3.6 years ago • written 3.6 years ago by geek_y9.4k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 774 users visited in the last hour