Skip to content

Commit ae1df1e

Browse files
committed
ImagePlot: do not require exact attribute, just matching names
1 parent 670735c commit ae1df1e

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

orangecontrib/spectroscopy/widgets/owhyper.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -937,18 +937,10 @@ class Result():
937937
pass
938938
res = Result()
939939

940-
xat = data.domain[attr_x]
941-
yat = data.domain[attr_y]
942-
943-
def extract_col(data, var):
944-
nd = Domain([var])
945-
d = data.transform(nd)
946-
return d.X[:, 0]
947-
948940
progress_interrupt(0)
949941

950-
res.coorx = extract_col(data, xat)
951-
res.coory = extract_col(data, yat)
942+
res.coorx = data.get_column(attr_x.name)
943+
res.coory = data.get_column(attr_y.name)
952944
res.data_points = np.hstack([res.coorx.reshape(-1, 1), res.coory.reshape(-1, 1)])
953945
res.lsx = lsx = values_to_linspace(res.coorx)
954946
res.lsy = lsy = values_to_linspace(res.coory)

0 commit comments

Comments
 (0)