[MSNoise] Problem with s07plot_dtt.py

Aurélien Mordret mordret at mit.edu
Wed Oct 8 00:23:59 UTC 2014


Hi,

Is the file containing the dtt results OK? Does it have results in there?

Actually, I don't use the plotting function, I use my own, GMT or Matlab
codes to plot the results, so I may not be able to help you further than
that...

Cheers,
Aurelien

2014-10-07 20:12 GMT-04:00 Oscar Alberto Castro Artola <
oscar.cas.art at gmail.com>:

> Hi Aurelien,
>
> thank you very much for your help! It actually worked but with an empty
> figure window. I tried to assign a name to *dttname* but with the same
> result.
>
> Any idea?
>
> Thanks!
>
> Oscar
>
> On Tue, Oct 7, 2014 at 5:53 PM, Aurélien Mordret <mordret at mit.edu> wrote:
>
> > Hi Oscar,
> >
> > It seems to me that you miss the wxPython package. Try to install it.
> That
> > should fix the mpl.use('WxAgg') problem.
> >
> > A quick dirty fix for your plot problem would be to replace line 123 by
> > plt.savefig('dtt_allmovstacksNEW.png', dpi=300)
> >
> > And wait for advice from Thomas for a better idea.
> >
> > Cheers,
> >
> > Aurelien
> >
> >
> > 2014-10-07 18:26 GMT-04:00 Oscar Alberto Castro Artola <
> > oscar.cas.art at gmail.com>:
> >
> > > Aurelien,
> > >
> > > thank you for your answer! I did upgrade matplotlib to 1.4.0 but the
> > error
> > > message is still there. I tried to comment the line #3 in
> > *s07plot_dtt.py*
> > > (mpl.use('WxAgg')) and got this error:
> > >
> > > *oscar at terminus:~/Doctorado/TI_2/sweet_noise$ py s07plot_dtt.py *
> > >
> > >
> >
> */home/oscar/bin/python/anaconda/lib/python2.7/site-packages/setuptools-3.6-py2.7.egg/pkg_resources.py:1045:
> > > UserWarning: /home/oscar/.python-eggs is writable by group/others and
> > > vulnerable to attack when used with get_resource_filename. Consider a
> > more
> > > secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE
> > > environment variable).*
> > > *Traceback (most recent call last):*
> > > *  File "s07plot_dtt.py", line 123, in <module>*
> > > *    plt.savefig('dtt_allmovstacksNEW_%s.png' % dttname, dpi=300)*
> > > *NameError: global name 'dttname' is not defined*
> > >
> > > I would apreciate any help! Thanks!
> > >
> > > Oscar
> > >
> > > On Tue, Oct 7, 2014 at 11:25 AM, Aurélien Mordret <mordret at mit.edu>
> > wrote:
> > >
> > > > Hi Oscar,
> > > >
> > > > I'm not very familiar with Python either but it seems that something
> is
> > > > wrong with matplotlib package.
> > > >
> > > > You can try to upgrade it...
> > > >
> > > >  easy_install --upgrade matplotlib
> > > >
> > > > Aurelien.
> > > >
> > > > 2014-10-07 12:19 GMT-04:00 Oscar Alberto Castro Artola <
> > > > oscar.cas.art at gmail.com>:
> > > >
> > > > > Hi,
> > > > >
> > > > > I have just updated to 1.2.5 and tried to run *s07plot_dtt.py
> *(again
> > > on
> > > > > both PCs) and I got this error message:
> > > > >
> > > > > oscar at terminus:~/msnoise_sismo$ py s07plot_dtt.py
> > > > > Traceback (most recent call last):
> > > > >   File "s07plot_dtt.py", line 13, in <module>
> > > > >     import matplotlib.pyplot as plt
> > > > >   File
> > > > >
> > > > >
> > > >
> > >
> >
> "/home/oscar/bin/python/anaconda/lib/python2.7/site-packages/matplotlib/pyplot.py",
> > > > > line 98, in <module>
> > > > >     _backend_mod, new_figure_manager, draw_if_interactive, _show =
> > > > > pylab_setup()
> > > > >   File
> > > > >
> > > > >
> > > >
> > >
> >
> "/home/oscar/bin/python/anaconda/lib/python2.7/site-packages/matplotlib/backends/__init__.py",
> > > > > line 28, in pylab_setup
> > > > >     globals(),locals(),[backend_name],0)
> > > > >   File
> > > > >
> > > > >
> > > >
> > >
> >
> "/home/oscar/bin/python/anaconda/lib/python2.7/site-packages/matplotlib/backends/backend_wxagg.py",
> > > > > line 6, in <module>
> > > > >     import backend_wx    # already uses
> > wxversion.ensureMinimal('2.8')
> > > > >   File
> > > > >
> > > > >
> > > >
> > >
> >
> "/home/oscar/bin/python/anaconda/lib/python2.7/site-packages/matplotlib/backends/backend_wx.py",
> > > > > line 53, in <module>
> > > > >     raise ImportError(missingwxversion)
> > > > > ImportError: Matplotlib backend_wx and backend_wxagg require
> > wxversion,
> > > > > which was not found.
> > > > >
> > > > > Please help!!!!!
> > > > >
> > > > > Oscar
> > > > > _______________________________________________
> > > > > MSNoise mailing list
> > > > > MSNoise at mailman-as.oma.be
> > > > > http://mailman-as.oma.be/mailman/listinfo/msnoise
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > ==========================
> > > >
> > > > Aurelien Mordret
> > > >
> > > > Postdoctoral fellow
> > > > Department of Earth, Atmospheric and Planetary Sciences
> > > > Massachusetts Institute of Technology
> > > > 54-526
> > > > Cambridge, MA  02139-4307
> > > > e-mail: mordret at mit.edu
> > > > web: http://web.mit.edu/mordret/www
> > > > _______________________________________________
> > > > MSNoise mailing list
> > > > MSNoise at mailman-as.oma.be
> > > > http://mailman-as.oma.be/mailman/listinfo/msnoise
> > > >
> > > >
> > > _______________________________________________
> > > MSNoise mailing list
> > > MSNoise at mailman-as.oma.be
> > > http://mailman-as.oma.be/mailman/listinfo/msnoise
> > >
> >
> >
> >
> > --
> > ==========================
> >
> > Aurelien Mordret
> >
> > Postdoctoral fellow
> > Department of Earth, Atmospheric and Planetary Sciences
> > Massachusetts Institute of Technology
> > 54-526
> > Cambridge, MA  02139-4307
> > e-mail: mordret at mit.edu
> > web: http://web.mit.edu/mordret/www
> > _______________________________________________
> > MSNoise mailing list
> > MSNoise at mailman-as.oma.be
> > http://mailman-as.oma.be/mailman/listinfo/msnoise
> >
> _______________________________________________
> MSNoise mailing list
> MSNoise at mailman-as.oma.be
> http://mailman-as.oma.be/mailman/listinfo/msnoise
>



-- 
==========================

Aurelien Mordret

Postdoctoral fellow
Department of Earth, Atmospheric and Planetary Sciences
Massachusetts Institute of Technology
54-526
Cambridge, MA  02139-4307
e-mail: mordret at mit.edu
web: http://web.mit.edu/mordret/www


More information about the MSNoise mailing list