Skip to content

Commit

Permalink
Merge pull request #749 from markotoplak/modify-hyper2
Browse files Browse the repository at this point in the history
ImagePlot: do not require exact attribute, just matching names
  • Loading branch information
markotoplak authored Sep 26, 2024
2 parents 670735c + ae1df1e commit bc77ae1
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions orangecontrib/spectroscopy/widgets/owhyper.py
Original file line number Diff line number Diff line change
Expand Up @@ -937,18 +937,10 @@ class Result():
pass
res = Result()

xat = data.domain[attr_x]
yat = data.domain[attr_y]

def extract_col(data, var):
nd = Domain([var])
d = data.transform(nd)
return d.X[:, 0]

progress_interrupt(0)

res.coorx = extract_col(data, xat)
res.coory = extract_col(data, yat)
res.coorx = data.get_column(attr_x.name)
res.coory = data.get_column(attr_y.name)
res.data_points = np.hstack([res.coorx.reshape(-1, 1), res.coory.reshape(-1, 1)])
res.lsx = lsx = values_to_linspace(res.coorx)
res.lsy = lsy = values_to_linspace(res.coory)
Expand Down

0 comments on commit bc77ae1

Please sign in to comment.