From 5b10f2a6fd08af9d4a06064efe854dcde86e7cb2 Mon Sep 17 00:00:00 2001 From: mauroalberti Date: Fri, 1 May 2020 10:34:44 +0200 Subject: [PATCH] updated linspace usage in apsg --- apsg/plotting.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/apsg/plotting.py b/apsg/plotting.py index f6dad72..a121abc 100644 --- a/apsg/plotting.py +++ b/apsg/plotting.py @@ -222,16 +222,24 @@ def plane(self, obj, *args, **kwargs): 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) + 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=cosd(inc) * 179 + 2) + 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))