You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am having issues with plotting the lune plot in the new matplotlib visualization backend. The problem seems to arise when a deviatoric grid-search (DC + CLVD). Although in this case, we are only using the lune longitude, this feature used to be functional in the previous backend with deviatoric solutions (see attached figures).
Here is the error I am getting:
Traceback (most recent call last): File "/home/scoped/inversiones/FK_GridSearch.DEV+Magnitude+Depth_Iceland.py", line 270, in <module> plot_misfit_lune(event_id+'DEV+Z_misfit.png', results) File "/home/scoped/mtuq/mtuq/graphics/uq/lune.py", line 63, in plot_misfit_lune _plot_lune(filename, misfit, **kwargs) File "/home/scoped/mtuq/mtuq/graphics/uq/lune.py", line 261, in _plot_lune backend(filename, File "/home/scoped/mtuq/mtuq/graphics/uq/_matplotlib.py", line 85, in _plot_lune_matplotlib im = ax.contourf(x, y, values, cmap=colormap, levels=levels, zorder=10) File "/opt/conda/lib/python3.10/site-packages/matplotlib/__init__.py", line 1465, in inner return func(ax, *map(sanitize_sequence, args), **kwargs) File "/opt/conda/lib/python3.10/site-packages/matplotlib/axes/_axes.py", line 6536, in contourf contours = mcontour.QuadContourSet(self, *args, **kwargs) File "/opt/conda/lib/python3.10/site-packages/matplotlib/contour.py", line 858, in __init__ kwargs = self._process_args(*args, **kwargs) File "/opt/conda/lib/python3.10/site-packages/matplotlib/contour.py", line 1523, in _process_args x, y, z = self._contour_args(args, kwargs) File "/opt/conda/lib/python3.10/site-packages/matplotlib/contour.py", line 1563, in _contour_args x, y, z = self._check_xyz(x, y, z_orig, kwargs) File "/opt/conda/lib/python3.10/site-packages/matplotlib/contour.py", line 1591, in _check_xyz raise TypeError(f"Input z must be at least a (2, 2) shaped array, " TypeError: Input z must be at least a (2, 2) shaped array, but has shape (1, 30)
It looks like the contour function in matplotlib expects a symmetric array and a deviatoric grid search has no points in the lune latitude.
Thanks for your help,
Felix
The text was updated successfully, but these errors were encountered:
Hi!
I am having issues with plotting the lune plot in the new matplotlib visualization backend. The problem seems to arise when a deviatoric grid-search (DC + CLVD). Although in this case, we are only using the lune longitude, this feature used to be functional in the previous backend with deviatoric solutions (see attached figures).
Here is the error I am getting:
Traceback (most recent call last): File "/home/scoped/inversiones/FK_GridSearch.DEV+Magnitude+Depth_Iceland.py", line 270, in <module> plot_misfit_lune(event_id+'DEV+Z_misfit.png', results) File "/home/scoped/mtuq/mtuq/graphics/uq/lune.py", line 63, in plot_misfit_lune _plot_lune(filename, misfit, **kwargs) File "/home/scoped/mtuq/mtuq/graphics/uq/lune.py", line 261, in _plot_lune backend(filename, File "/home/scoped/mtuq/mtuq/graphics/uq/_matplotlib.py", line 85, in _plot_lune_matplotlib im = ax.contourf(x, y, values, cmap=colormap, levels=levels, zorder=10) File "/opt/conda/lib/python3.10/site-packages/matplotlib/__init__.py", line 1465, in inner return func(ax, *map(sanitize_sequence, args), **kwargs) File "/opt/conda/lib/python3.10/site-packages/matplotlib/axes/_axes.py", line 6536, in contourf contours = mcontour.QuadContourSet(self, *args, **kwargs) File "/opt/conda/lib/python3.10/site-packages/matplotlib/contour.py", line 858, in __init__ kwargs = self._process_args(*args, **kwargs) File "/opt/conda/lib/python3.10/site-packages/matplotlib/contour.py", line 1523, in _process_args x, y, z = self._contour_args(args, kwargs) File "/opt/conda/lib/python3.10/site-packages/matplotlib/contour.py", line 1563, in _contour_args x, y, z = self._check_xyz(x, y, z_orig, kwargs) File "/opt/conda/lib/python3.10/site-packages/matplotlib/contour.py", line 1591, in _check_xyz raise TypeError(f"Input z must be at least a (2, 2) shaped array, " TypeError: Input z must be at least a (2, 2) shaped array, but has shape (1, 30)
It looks like the contour function in matplotlib expects a symmetric array and a deviatoric grid search has no points in the lune latitude.
Thanks for your help,
Felix
The text was updated successfully, but these errors were encountered: