NameError: global name 'xticks' is not defined in graphlan_lib.py while running GraPhlAn
0
0
Entering edit mode
9.2 years ago
cvu ▴ 180

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!

GraPhlAn Python metagenomics taxonomy • 4.4k views
ADD COMMENT
0
Entering edit mode

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 REPLY

Login before adding your answer.

Traffic: 1966 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6