arrayfire / forge

High Performance Visualization
222 stars 48 forks source link

how to save plot image #194

Closed zdgithub closed 5 years ago

zdgithub commented 5 years ago

I want to save the plot image instead of displaying it. But I don't find the proper function.

const static int width = 512, height = 512;
af::Window window(width, height, "2D plot example title");
do{
array X = seq(-af::Pi, af::Pi, 0.01);
array Y = sin(X);
window.plot(X, Y);
} while( !window.close() );
9prady9 commented 5 years ago

Window has a method saveFrameBuffer.

zdgithub commented 5 years ago

Window has a method saveFrameBuffer.

I can't find the function in http://arrayfire.org/docs/classaf_1_1Window.htm

zdgithub commented 5 years ago

Thank you! I have found it in http://arrayfire.org/forge/classforge_1_1Window.htm#a7b42bb1b6fe76015118491ca1c9f7e84