mplstereonet icon indicating copy to clipboard operation
mplstereonet copied to clipboard

Cone plotting incorrectly where [angle] >= Plunge

Open OverCal opened this issue 6 months ago • 0 comments

When bidirectional = True, the shading of the cone is inverted where it crosses the stereonet boundary.

This error can be reproduced by using the example script with slight modification, where an angle of 59 will plot correctly and and angle of 60 will then invert:

import matplotlib.pyplot as plt import numpy as np import mplstereonet

Generate some scattered strikes and dips

num = 100 strike0, dip0 = 180, 60 strike = np.random.normal(strike0, 5, num) dip = np.random.normal(dip0, 5, num)

Convert the strike/dip of the pole to plane to a plunge/bearing

plunge, bearing = mplstereonet.stereonet_math.pole2plunge_bearing(strike0, dip0) fig, ax = mplstereonet.subplots() ax.pole(strike, dip, color='k') ax.cone(plunge, bearing, [60], linewidth=1, facecolor='blue', zorder=1, alpha=0.2, edgecolors='black', bidirectional=True) plt.show()

OverCal avatar Aug 10 '24 02:08 OverCal