46 void initWindow(
const int width,
const int height,
const char*
const title);
80 Window(
const int width,
const int height,
const char*
const title=
"ArrayFire");
118 void setPos(
const unsigned x,
const unsigned y);
129#if AF_API_VERSION >= 31
138 void setSize(
const unsigned w,
const unsigned h);
162#if AF_API_VERSION >= 32
174 void plot3(const
array& in, const
char* title=NULL);
177#if AF_API_VERSION >= 34
189 void plot(
const array& in,
const char*
const title=NULL);
192#if AF_API_VERSION >= 34
221#if AF_API_VERSION >= 34
235 const char*
const title = NULL);
238#if AF_API_VERSION >= 34
256#if AF_API_VERSION >= 33
273#if AF_API_VERSION >= 33
285 const
char* const title = NULL);
300 void hist(
const array& X,
const double minval,
const double maxval,
const char*
const title=NULL);
302#if AF_API_VERSION >= 32
316#if AF_API_VERSION >= 32
332#if AF_API_VERSION >= 34
352#if AF_API_VERSION >= 34
370 const char*
const title = NULL);
373#if AF_API_VERSION >= 34
389 const char*
const title = NULL);
392#if AF_API_VERSION >= 34
409#if AF_API_VERSION >= 34
425 const bool exact =
false);
428#if AF_API_VERSION >= 34
445 const float ymin,
const float ymax,
446 const bool exact =
false);
449#if AF_API_VERSION >= 34
468 const float ymin,
const float ymax,
469 const float zmin,
const float zmax,
470 const bool exact =
false);
473#if AF_API_VERSION >= 34
486 const char *
const ytitle =
"Y-Axis",
487 const char *
const ztitle = NULL);
490#if AF_API_VERSION >= 37
501 const char *
const yformat =
"4.1%f",
502 const char *
const zformat = NULL);
513 void grid(
const int rows,
const int cols);
534#if AF_API_VERSION >= 33
615#if AF_API_VERSION >= 31
664AF_DEPRECATED(
"Use af_draw_plot_nd or af_draw_plot_2d instead")
667#if AF_API_VERSION >= 32
683AF_DEPRECATED(
"Use af_draw_plot_nd or af_draw_plot_3d instead")
687#if AF_API_VERSION >= 34
707#if AF_API_VERSION >= 34
728#if AF_API_VERSION >= 34
751#if AF_API_VERSION >= 33
769AF_DEPRECATED(
"Use af_draw_scatter_nd or af_draw_scatter_2d instead")
774#if AF_API_VERSION >= 33
789AF_DEPRECATED(
"Use af_draw_scatter_nd or af_draw_scatter_3d instead")
794#if AF_API_VERSION >= 34
816#if AF_API_VERSION >= 34
838#if AF_API_VERSION >= 34
881#if AF_API_VERSION >= 32
902#if AF_API_VERSION >= 34
931#if AF_API_VERSION >= 34
959#if AF_API_VERSION >= 34
999#if AF_API_VERSION >= 34
1025#if AF_API_VERSION >= 34
1045 const float xmin,
const float xmax,
1046 const float ymin,
const float ymax,
1051#if AF_API_VERSION >= 34
1073 const float xmin,
const float xmax,
1074 const float ymin,
const float ymax,
1075 const float zmin,
const float zmax,
1080#if AF_API_VERSION >= 34
1102 const char *
const xtitle,
1103 const char *
const ytitle,
1104 const char *
const ztitle,
1108#if AF_API_VERSION >= 37
1131 const char *
const xformat,
1132 const char *
const yformat,
1133 const char *
const zformat,
1163#if AF_API_VERSION >= 33
Window object to render af::arrays.
Window & operator()(const int r, const int c)
This function is used to keep track of which cell in the grid mode is being currently rendered.
A multi dimensional data container.
#define AF_DEPRECATED(msg)
void surface(const array &S, const char *const title=NULL)
Renders the input arrays as a 3D surface plot to the window.
void plot(const array &X, const array &Y, const array &Z, const char *const title=NULL)
Renders the input arrays as a 3D plot to the window.
AFAPI af_err af_draw_scatter_3d(const af_window wind, const af_array X, const af_array Y, const af_array Z, const af_marker_type marker, const af_cell *const props)
C Interface wrapper for drawing an array as a 3D plot.
void surface(const array &xVals, const array &yVals, const array &S, const char *const title=NULL)
Renders the input arrays as a 3D surface plot to the window.
AFAPI af_err af_draw_vector_field_nd(const af_window wind, const af_array points, const af_array directions, const af_cell *const props)
C Interface wrapper for drawing array's as a 2D or 3D vector field.
AFAPI af_err af_draw_scatter(const af_window wind, const af_array X, const af_array Y, const af_marker_type marker, const af_cell *const props)
C Interface wrapper for drawing an array as a plot.
void vectorField(const array &xPoints, const array &yPoints, const array &zPoints, const array &xDirs, const array &yDirs, const array &zDirs, const char *const title=NULL)
Renders the input arrays as a 3D vector field plot to the window.
void vectorField(const array &points, const array &directions, const char *const title=NULL)
Renders the input arrays as a 2D or 3D vector field plot to the window.
AFAPI af_err af_draw_image(const af_window wind, const af_array in, const af_cell *const props)
C Interface wrapper for drawing an array as an image.
AFAPI af_err af_draw_plot_2d(const af_window wind, const af_array X, const af_array Y, const af_cell *const props)
C Interface wrapper for drawing an array as a 2D plot.
void scatter(const array &X, const array &Y, const af::markerType marker=AF_MARKER_POINT, const char *const title=NULL)
Renders the input arrays as a 2D scatter-plot to the window.
AFAPI af_err af_draw_scatter3(const af_window wind, const af_array P, const af_marker_type marker, const af_cell *const props)
C Interface wrapper for drawing an array as a plot.
AFAPI af_err af_draw_scatter_2d(const af_window wind, const af_array X, const af_array Y, const af_marker_type marker, const af_cell *const props)
C Interface wrapper for drawing an array as a 2D plot.
void plot(const array &X, const array &Y, const char *const title=NULL)
Renders the input arrays as a 2D plot to the window.
AFAPI af_err af_draw_scatter_nd(const af_window wind, const af_array P, const af_marker_type marker, const af_cell *const props)
C Interface wrapper for drawing an array as a plot.
AFAPI af_err af_draw_vector_field_2d(const af_window wind, const af_array xPoints, const af_array yPoints, const af_array xDirs, const af_array yDirs, const af_cell *const props)
C Interface wrapper for drawing array's as a 2D vector field.
void vectorField(const array &xPoints, const array &yPoints, const array &xDirs, const array &yDirs, const char *const title=NULL)
Renders the input arrays as a 2D vector field plot to the window.
AFAPI af_err af_draw_surface(const af_window wind, const af_array xVals, const af_array yVals, const af_array S, const af_cell *const props)
C Interface wrapper for drawing array's as a surface.
AFAPI af_err af_draw_plot_3d(const af_window wind, const af_array X, const af_array Y, const af_array Z, const af_cell *const props)
C Interface wrapper for drawing an array as a 3D plot.
AFAPI af_err af_draw_plot3(const af_window wind, const af_array P, const af_cell *const props)
C Interface wrapper for drawing an array as a plot.
void scatter(const array &X, const array &Y, const array &Z, const af::markerType marker=AF_MARKER_POINT, const char *const title=NULL)
Renders the input arrays as a 3D scatter-plot to the window.
AFAPI af_err af_draw_plot_nd(const af_window wind, const af_array P, const af_cell *const props)
C Interface wrapper for drawing an array as a 2D or 3D plot.
AFAPI af_err af_draw_plot(const af_window wind, const af_array X, const af_array Y, const af_cell *const props)
C Interface wrapper for drawing an array as a plot.
void image(const array &in, const char *title=NULL)
Renders the input array as an image to the window.
void plot(const array &in, const char *const title=NULL)
Renders the input arrays as a 2D or 3D plot to the window.
AFAPI af_err af_draw_hist(const af_window wind, const af_array X, const double minval, const double maxval, const af_cell *const props)
C Interface wrapper for drawing an array as a histogram.
AFAPI af_err af_draw_vector_field_3d(const af_window wind, const af_array xPoints, const af_array yPoints, const af_array zPoints, const af_array xDirs, const af_array yDirs, const af_array zDirs, const af_cell *const props)
C Interface wrapper for drawing array's as a 3D vector field.
void scatter(const array &in, const af::markerType marker=AF_MARKER_POINT, const char *const title=NULL)
Renders the input arrays as a 2D or 3D scatter-plot to the window.
void hist(const array &X, const double minval, const double maxval, const char *const title=NULL)
Renders the input array as a histogram to the window.
Window()
Creates a window object with default width and height with title set to "ArrayFire".
Window(const int width, const int height, const char *const title="ArrayFire")
Creates a window object using the parameters provided by the user.
void setAxesLimits(const float xmin, const float xmax, const float ymin, const float ymax, const float zmin, const float zmax, const bool exact=false)
Setup the axes limits for a histogram/plot/surface/vector field.
void setAxesLimits(const array &x, const array &y, const bool exact=false)
Setup the axes limits for a 2D histogram/plot/vector field.
void setAxesLabelFormat(const char *const xformat="4.1%f", const char *const yformat="4.1%f", const char *const zformat=NULL)
Setup the axes label formats for charts.
~Window()
Destroys the window handle.
void setSize(const unsigned w, const unsigned h)
Set the window size.
AFAPI af_err af_grid(const af_window wind, const int rows, const int cols)
C Interface wrapper for grid setup in a window.
AFAPI af_err af_set_title(const af_window wind, const char *const title)
C Interface wrapper for setting window title.
AFAPI af_err af_set_axes_titles(const af_window wind, const char *const xtitle, const char *const ytitle, const char *const ztitle, const af_cell *const props)
C Interface wrapper for setting axes titles for histogram/plot/surface/vector field.
bool close()
Check if window is marked for close.
AFAPI af_err af_destroy_window(const af_window wind)
C Interface wrapper for destroying a window handle.
void show()
This function swaps the background buffer to current view and polls for any key strokes while the win...
AFAPI af_err af_show(const af_window wind)
C Interface wrapper for showing a window.
void setAxesLimits(const float xmin, const float xmax, const float ymin, const float ymax, const bool exact=false)
Setup the axes limits for a histogram/plot/surface/vector field.
void setTitle(const char *const title)
Set the window title.
AFAPI af_err af_set_axes_limits_compute(const af_window wind, const af_array x, const af_array y, const af_array z, const bool exact, const af_cell *const props)
C Interface for setting axes limits for a histogram/plot/surface/vector field.
Window(const af_window window)
Creates a window object with default width and height with title set to "ArrayFire".
AFAPI af_err af_create_window(af_window *out, const int width, const int height, const char *const title)
C Interface wrapper for creating a window.
AFAPI af_err af_set_position(const af_window wind, const unsigned x, const unsigned y)
C Interface wrapper for setting the start position when window is displayed.
void setPos(const unsigned x, const unsigned y)
Set the start position where the window will appear.
void setVisibility(const bool isVisible)
Hide/Show the window.
void setAxesLimits(const array &x, const array &y, const array &z, const bool exact=false)
Setup the axes limits for a histogram/plot/surface/vector field.
AFAPI af_err af_set_size(const af_window wind, const unsigned w, const unsigned h)
C Interface wrapper for setting window position.
AFAPI af_err af_is_window_closed(bool *out, const af_window wind)
C Interface wrapper for checking if window is marked for close.
void setColorMap(const ColorMap cmap)
Set the colormap to be used for subsequent rendering calls.
AFAPI af_err af_set_visibility(const af_window wind, const bool is_visible)
Hide/Show a window.
Window(const char *const title)
Creates a window object with default width and height using the title provided by the user.
AFAPI af_err af_set_axes_limits_3d(const af_window wind, const float xmin, const float xmax, const float ymin, const float ymax, const float zmin, const float zmax, const bool exact, const af_cell *const props)
C Interface for setting axes limits for a 3D plot/surface/vector field.
AFAPI af_err af_set_axes_limits_2d(const af_window wind, const float xmin, const float xmax, const float ymin, const float ymax, const bool exact, const af_cell *const props)
C Interface for setting axes limits for a 2D histogram/plot/vector field.
void grid(const int rows, const int cols)
Setup grid layout for multiview mode in a window.
AFAPI af_err af_set_axes_label_format(const af_window wind, const char *const xformat, const char *const yformat, const char *const zformat, const af_cell *const props)
C Interface wrapper for setting axes labels formats for charts.
void setAxesTitles(const char *const xtitle="X-Axis", const char *const ytitle="Y-Axis", const char *const ztitle=NULL)
Setup the axes titles for a plot/surface/vector field.