def plane(self, obj, *args, **kwargs): """Draw Fol as great circle""" assert obj.type is Fol, "Only Fol instance could be plotted as plane." if "zorder" not in kwargs: kwargs["zorder"] = 5 animate = kwargs.pop("animate", False) if isinstance(obj, Group): x = [] y = [] for azi, inc in obj.dd.T: xx, yy = self._cone( p2v(azi, inc), l2v(azi, inc), limit=89.9999, res=cosd(inc) * 179 + 2 ) x = np.hstack((x, xx, np.nan)) y = np.hstack((y, yy, np.nan)) x = x[:-1] y = y[:-1] else: azi, inc = obj.dd x, y = self._cone( p2v(azi, inc), l2v(azi, inc), limit=89.9999, res=cosd(inc) * 179 + 2 ) h = self.fig.axes[self.active].plot(x, y, *args, **kwargs) if animate: self.artists.append(tuple(h)) self.draw()
def plane(self, obj, *args, **kwargs): """Draw Fol as great circle""" assert obj.type is Fol, "Only Fol instance could be plotted as plane." if "zorder" not in kwargs: kwargs["zorder"] = 5 animate = kwargs.pop("animate", False) if isinstance(obj, Group): x = [] y = [] for azi, inc in obj.dd.T: xx, yy = self._cone( p2v(azi, inc), l2v(azi, inc), limit=89.9999, res=int(cosd(inc) * 179 + 2) ) x = np.hstack((x, xx, np.nan)) y = np.hstack((y, yy, np.nan)) x = x[:-1] y = y[:-1] else: azi, inc = obj.dd x, y = self._cone( p2v(azi, inc), l2v(azi, inc), limit=89.9999, res=int(cosd(inc) * 179 + 2) ) h = self.fig.axes[self.active].plot(x, y, *args, **kwargs) if animate: self.artists.append(tuple(h)) self.draw()
def lon(a, theta): return self._cone(p2v(a, theta), l2v(a, theta), limit=80, res=91)