0

When matlplotlib run (from summarize_taxa_through_plots.py) I got the error:

...
 raise RuntimeError('Invalid DISPLAY variable')
RuntimeError: Invalid DISPLAY variable

I saw this problem in a lot of sites, the solution is to change user's matplotlirc or global one:

backend:qt4agg

to

backend:agg

I change the global matplotlibrc.

Now when I run the program use matplotlib I get:

Command returned exit status: 1
Stdout:

Stderr
Traceback (most recent call last):
  File "/path/to/python/2.7.6/bin/plot_taxa_summary.py", line 278, in <module>
    main()
  File "/path/to/python/2.7.6/bin/plot_taxa_summary.py", line 274, in main
    resize_nth_label, label_type, include_html_legend)
  File "/path/to/python/2.7.6/lib/python2.7/site-packages/qiime/plot_taxa_summary.py", line 1138, in make_all_charts
    resize_nth_label, label_type, include_html_legend))
  File "/path/to/python/2.7.6/lib/python2.7/site-packages/qiime/plot_taxa_summary.py", line 1073, in get_counts
    label_type, include_html_legend))
  File "/path/to/python/2.7.6/lib/python2.7/site-packages/qiime/plot_taxa_summary.py", line 861, in make_HTML_table
    props={'title': title})
  File "/path/to/python/2.7.6/lib/python2.7/site-packages/qiime/plot_taxa_summary.py", line 662, in make_area_bar_chart
    background_color, img_abs, generate_image_type, dpi)
  File "/path/to/python/2.7.6/lib/python2.7/site-packages/qiime/plot_taxa_summary.py", line 187, in make_legend
    shadow=False, fancybox=False)
  File "/path/to/python/2.7.6/lib/python2.7/site-packages/matplotlib/figure.py", line 1251, in legend
    l = Legend(self, handles, labels, *args, **kwargs)
  File "/path/to/python/2.7.6/lib/python2.7/site-packages/matplotlib/legend.py", line 385, in __init__
    self._init_legend_box(handles, labels, markerfirst)
  File "/path/to/python/2.7.6/lib/python2.7/site-packages/matplotlib/legend.py", line 654, in _init_legend_box
    fontsize, handlebox))
  File "/path/to/python/2.7.6/lib/python2.7/site-packages/matplotlib/legend_handler.py", line 119, in legend_artist
    fontsize, handlebox.get_transform())
  File "/path/to/python/2.7.6/lib/python2.7/site-packages/matplotlib/legend_handler.py", line 252, in create_artists
    self.update_prop(p, orig_handle, legend)
  File "/path/to/python/2.7.6/lib/python2.7/site-packages/matplotlib/legend_handler.py", line 78, in update_prop
    legend._set_artist_props(legend_handle)
  File "/path/to/python/2.7.6/lib/python2.7/site-packages/matplotlib/legend.py", line 401, in _set_artist_props
    a.set_figure(self.figure)
  File "/path/to/python/2.7.6/lib/python2.7/site-packages/matplotlib/artist.py", line 640, in set_figure
    raise RuntimeError("Can not put single artist in "
RuntimeError: Can not put single artist in more than one figure

Any idea?

ali_m
  • 71,714
  • 23
  • 223
  • 298
user1980099
  • 573
  • 1
  • 8
  • 30
  • Show us your code and the rest of the traceback – ali_m Nov 22 '15 at 17:46
  • I have python 2.7.6 with matplotlib==1.5.0. When I tried it in python 2.7.9 with matplotlib==1.4.3 the change in matplotlibrc work okay and I dont get the second err with : "Can not put ... Is there any way to make it work with matplotlib==1.5.0.? – user1980099 Nov 23 '15 at 09:52
  • The program is summarize_taxa_through_plots.py, which I think is part of the qiime module that installed in python. I edit my question and add the full error message – user1980099 Nov 23 '15 at 11:02
  • qiime is not a part of the standard library so most of us don't have it installed. Can you try to make a [Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve) that reproduces the error? – titusjan Nov 23 '15 at 19:29

1 Answers1

0

The suggestion is to downgrade the matplotlib version you have and to use something like 1.4.x. See this issue in the qiime GitHub repo.

El Developer
  • 3,345
  • 1
  • 21
  • 40