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
for negative value bounds[bb] is the upper bracket, which however should be the lower bracket.
Proposed solution - use positive values and multiply with the original sign (not thoroughly tested!)
# Get the sign of the skew angle: skew_sign=np.sign(colorx)
# New variable to work with abs_color=np.abs(colorx)
# Use original code, start with angles outside given range: ifabs_color>bounds.max():
# Restore sign here: cvar=skew_sign*1.0returnget_color(cvar, cmap)
# Take care of angles in interval:forbbinrange(bounds.shape[0]):
ifabs_color>=bounds[bb] andabs_color<bounds[bb+1]:
# Restore sign here: cvar=skew_sign*float(bounds[bb])/bounds.max()
returnget_color(cvar, cmap)
Cheers
-Ralf
The text was updated successfully, but these errors were encountered:
Hi all,
(very quiet here, is MTPy still developed?)
there seems to be a bug when plotting phase tensor ellipses using the skew angle (beta) with the 'skew_seg' colours.
BUG: negative angles don't get correctly mapped into the assigned color segments
Here is the relevant code in sub get_plot_color in module mtcolors.py:
for negative value bounds[bb] is the upper bracket, which however should be the lower bracket.
Proposed solution - use positive values and multiply with the original sign (not thoroughly tested!)
Cheers
-Ralf
The text was updated successfully, but these errors were encountered: