MTgeophysics / mtpy

Python toolbox for standard Magnetotelluric (MT) data analysis
GNU General Public License v3.0
145 stars 66 forks source link

Plot ModEM response in 2 columns #93

Closed kashkoulimohammad closed 4 years ago

kashkoulimohammad commented 4 years ago

Dear all,

I tried to plot ModEM response but I could not plot in 2 columns and these errors happened:

Traceback (most recent call last):
  File "plot_response.py", line 20, in <module>
    ro.plot()
  File "/home/mkash/.local/lib/python3.7/site-packages/mtpy/modeling/modem/plot_response.py", line 199, in plot
    self._plot_2col()
  File "/home/mkash/.local/lib/python3.7/site-packages/mtpy/modeling/modem/plot_response.py", line 1947, in _plot_2col
    legend_ax_list = self.ax_list[0:self.plot_component / 2]
TypeError: slice indices must be integers or None or have an __index__ method

I

alkirkby commented 4 years ago

I've pushed an update that should fix this issue in the example script. Let me know if you have any more issues.

kashkoulimohammad commented 4 years ago

@alkirkby Thank you. I installed mtpy by pip. Will it apply in pip package?

alkirkby commented 4 years ago

Sorry no it won't unfortunately as the pip package is a static release. That will have to wait until our next release. If you want the update immediately I'd recommend using the instructions on our wiki page: https://github.com/MTgeophysics/mtpy/wiki

kashkoulimohammad commented 4 years ago

Dear Dr. Kirkby,

In the static version, outputs of phase tensor section for station name write extra characters. For instance, instead of MT104 write b'MT104'. l5_skew_n2 Regards,