Skip to content

Commit

Permalink
Comment updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jonmmease committed Jan 22, 2019
1 parent 5886917 commit 72b2c68
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions datashader/glyphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,14 @@ def extend(aggs, df, vt, bounds, plot_start=True):


class LinesXY(_PointLike):
"""A collection of lines (on line per row) with vertices defined
by the lists of columns in ``x`` and ``y``
Parameters
----------
x, y : list
Lists of column names for the x and y coordinates
"""
def validate(self, in_dshape):
if not all([isreal(in_dshape.measure[xcol]) for xcol in self.x]):
raise ValueError('x columns must be real')
Expand Down Expand Up @@ -283,10 +290,8 @@ def compute_x_bounds_dask(self, df):
minval, maxval = np.nanmin(x_mins), np.nanmax(x_maxes)

if minval == np.nan and maxval == np.nan:
# print("No x values; defaulting to range -1,1")
minval, maxval = -1, 1
elif minval == maxval:
# print("No x range; defaulting to x-1,x+1")
minval, maxval = minval - 1, minval + 1
return minval, maxval

Expand All @@ -301,10 +306,8 @@ def compute_y_bounds_dask(self, df):
minval, maxval = np.nanmin(y_mins), np.nanmax(y_maxes)

if minval == np.nan and maxval == np.nan:
# print("No x values; defaulting to range -1,1")
minval, maxval = -1, 1
elif minval == maxval:
# print("No x range; defaulting to x-1,x+1")
minval, maxval = minval - 1, minval + 1
return minval, maxval

Expand Down

0 comments on commit 72b2c68

Please sign in to comment.