MCPcopy Create free account
hub / github.com/apache/arrow / plot_3d

Function plot_3d

cpp/src/arrow/acero/hash_join_graphs.py:144–159  ·  view source on GitHub ↗
(test, sorted_argnames)

Source from the content-addressed store, hash-verified

142 plot_1d(filtered_test, sorted_argnames[1], ax, construct_name(sorted_argnames[0], line))
143
144def plot_3d(test, sorted_argnames):
145 assert len(sorted_argnames) == 3
146 num_graphs = len(set(test.args[sorted_argnames[0]]))
147 num_rows = int(math.ceil(math.sqrt(num_graphs)))
148 num_cols = int(math.ceil(num_graphs / num_rows))
149 graphs = set(test.args[sorted_argnames[0]])
150
151 for j, graph in enumerate(sorted(graphs, key=try_as_numeric)):
152 ax = plt.subplot(num_rows, num_cols, j + 1)
153 filtered_test = Test()
154 indices = range(len(test.times))
155 indices = list(filter(lambda i: test.args[sorted_argnames[0]][i] == graph, indices))
156 filtered_test.times = [test.times[i] for i in indices]
157 filtered_test.args[sorted_argnames[1]] = [test.args[sorted_argnames[1]][i] for i in indices]
158 filtered_test.args[sorted_argnames[2]] = [test.args[sorted_argnames[2]][i] for i in indices]
159 plot_2d(filtered_test, sorted_argnames[1:], ax, construct_name(sorted_argnames[0], graph))
160
161def main():
162 if len(sys.argv) != 2:

Callers 1

mainFunction · 0.85

Calls 5

lenFunction · 0.85
TestClass · 0.85
listFunction · 0.85
plot_2dFunction · 0.85
construct_nameFunction · 0.85

Tested by

no test coverage detected