MCPcopy Create free account
hub / github.com/arrayfire/forge / fg_add_histogram_to_chart

Function fg_add_histogram_to_chart

src/api/c/chart.cpp:233–252  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

231}
232
233fg_err fg_add_histogram_to_chart(fg_histogram* pHistogram, fg_chart pChart,
234 const unsigned pNBins, const fg_dtype pType)
235{
236 try {
237 ARG_ASSERT(1, (pChart!=0));
238 ARG_ASSERT(2, (pNBins>0));
239
240 common::Chart* chrt = getChart(pChart);
241
242 // Histogram is only allowed in FG_CHART_2D
243 ARG_ASSERT(5, chrt->chartType() == FG_CHART_2D);
244
245 common::Histogram* hist = new common::Histogram(pNBins, (forge::dtype)pType);
246 chrt->addRenderable(hist->impl());
247 *pHistogram = getHandle(hist);
248 }
249 CATCHALL
250
251 return FG_ERR_NONE;
252}
253
254fg_err fg_add_plot_to_chart(fg_plot* pPlot, fg_chart pChart,
255 const unsigned pNPoints, const fg_dtype pType,

Callers 1

histogramMethod · 0.85

Calls 4

getChartFunction · 0.85
getHandleFunction · 0.85
chartTypeMethod · 0.80
addRenderableMethod · 0.45

Tested by

no test coverage detected