Skip to content

Commit

Permalink
add release notes v0.1.6 including review comments and fix doc building
Browse files Browse the repository at this point in the history
  • Loading branch information
earthai-tech committed Feb 26, 2023
1 parent a557838 commit 1bf52e9
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 9 deletions.
23 changes: 18 additions & 5 deletions docs/whatsnew/v0.1.6.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,24 @@ Bug fixes

.. code-block:: default
File "/home/docs/checkouts/readthedocs.org/user_builds/watex/envs/master/lib/python3.10/site-packages/matplotlib/_api/__init__.py", line 224, in __getattr__
raise AttributeError(
AttributeError: module 'matplotlib.cm' has no attribute 'cmap_d'
We fix it ( just for doc building ) by using the matplotlib colormaps rather than MTpy proper colors.
Unexpected failing examples:
/home/docs/checkouts/readthedocs.org/user_builds/watex/checkouts/master/examples/methods/plot_phase_tensors.py failed leaving traceback:
Traceback (most recent call last):
File "/home/docs/checkouts/readthedocs.org/user_builds/watex/checkouts/master/examples/methods/plot_phase_tensors.py", line 39, in <module>
tplot.plot_phase_tensors (ellipse_dict= ellip_dic)
File "/home/docs/checkouts/readthedocs.org/user_builds/watex/checkouts/master/watex/view/plot.py", line 826, in plot_phase_tensors
from mtpy.imaging.phase_tensor_pseudosection import (
File "/home/docs/checkouts/readthedocs.org/user_builds/watex/envs/master/lib/python3.10/site-packages/mtpy/imaging/phase_tensor_pseudosection.py", line 18, in <module>
import mtpy.imaging.mtcolors as mtcl
File "/home/docs/checkouts/readthedocs.org/user_builds/watex/envs/master/lib/python3.10/site-packages/mtpy/imaging/mtcolors.py", line 252, in <module>
cmapdict.update(cm.cmap_d)
File "/home/docs/checkouts/readthedocs.org/user_builds/watex/envs/master/lib/python3.10/site-packages/matplotlib/_api/__init__.py", line 224, in __getattr__
raise AttributeError(
AttributeError: module 'matplotlib.cm' has no attribute 'cmap_d'
To fix it and let the doc building correctly, we uncomment the example in gallery ``methods.plot_phase_tensors.py`` ( just for doc building )
rather than using the matplotlib colormaps instead since MTpy proper colors don't work.


.. _comments:
Expand Down
12 changes: 8 additions & 4 deletions examples/methods/plot_phase_tensors.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
# * Ellipse of ``'phimin'``
tplot= wx.TPlot (fig_size =( 5, 2 )).fit(edi_samples )
# --------------------------------------------------
# THIS SECTION IS JUST COMMENTED FOR DOC BUILDING
# SEE RELEASE NOTES v0.1.6 FOR THE REASON
# UNCOMMENT ">>>.." LINES AND RUN IT FOR TENSOR VISUALIZATION
#
# we can skip the ellip_dic config by using the defaut customization. However
# to skip the error from MTpy color when building the doc, we use the matplotlib
# conventional colormap instead.
Expand All @@ -36,7 +40,7 @@
'ellip_size': 2,
'ellipse_cmap':'bwr' # or color defined in `cmap` parameter such as `mt_bl2wh2rd`
}
tplot.plot_phase_tensors (ellipse_dict= ellip_dic)
# >>> tplot.plot_phase_tensors (ellipse_dict= ellip_dic)
# by default the color limit for 'phmin' is [0, 90]
# %%
# * Ellipse of ``'skew'`` visualization
Expand All @@ -47,11 +51,11 @@
'ellip_size': 2,
'ellipse_cmap':'PuOr' # or color defined in `cmap` parameter such as `mt_bl2wh2rd`
}
#>>> tplot.plot_phase_tensor (ellipse_dict=ellip_dic )
# >>> tplot.plot_phase_tensor (ellipse_dict=ellip_dic )
# or simply turn on `tensor` parameter to ``skew`` like:
tplot.plot_phase_tensors (tensor='skew' , ellipse_dict=ellip_dic_sk)
# >>> tplot.plot_phase_tensors (tensor='skew' , ellipse_dict=ellip_dic_sk)

# %%
# * Determinant of phase tensor ``'phidet'``
tplot.plot_phase_tensors (tensor='phidet', ellipse_dict= ellip_dic_sk )
# >>> tplot.plot_phase_tensors (tensor='phidet', ellipse_dict= ellip_dic_sk )

0 comments on commit 1bf52e9

Please sign in to comment.