MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / af_draw_scatter3

Function af_draw_scatter3

src/api/c/plot.cpp:438–468  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

436}
437
438af_err af_draw_scatter3(const af_window wind, const af_array P,
439 const af_marker_type af_marker,
440 const af_cell* const props) {
441 try {
442 fg_marker_type fg_marker = getFGMarker(af_marker);
443 const ArrayInfo& info = getInfo(P);
444 af::dim4 dims = info.dims();
445
446 if (dims.ndims() == 2 && dims[1] == 3) {
447 return plotWrapper(wind, P, 1, props, FG_PLOT_SCATTER, fg_marker);
448 }
449 if (dims.ndims() == 2 && dims[0] == 3) {
450 return plotWrapper(wind, P, 0, props, FG_PLOT_SCATTER, fg_marker);
451 } else if (dims.ndims() == 1 && dims[0] % 3 == 0) {
452 dim4 rdims(dims.elements() / 3, 3, 1, 1);
453 af_array in = 0;
454 AF_CHECK(af_moddims(&in, P, rdims.ndims(), rdims.get()));
455 af_err err =
456 plotWrapper(wind, in, 1, props, FG_PLOT_SCATTER, fg_marker);
457 AF_CHECK(af_release_array(in));
458 return err;
459 } else {
460 AF_RETURN_ERROR(
461 "Input needs to be either [n, 3] or [3, n] or [3n, 1]",
462 AF_ERR_SIZE);
463 }
464 }
465 CATCHALL;
466
467 return AF_SUCCESS;
468}

Callers

nothing calls this directly

Calls 8

getFGMarkerFunction · 0.85
plotWrapperFunction · 0.85
af_moddimsFunction · 0.70
af_release_arrayFunction · 0.70
dimsMethod · 0.45
ndimsMethod · 0.45
elementsMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected