Plot_functions

## Functions

FGAPI fg_err | fg_create_plot (fg_plot *pPlot, const unsigned pNPoints, const fg_dtype pType, const fg_chart_type pChartType, const fg_plot_type pPlotType, const fg_marker_type pMarkerType)
| Create a Plot object.
FGAPI fg_err | fg_retain_plot (fg_plot *pOut, fg_plot pIn)
| Increase reference count of the resource.
FGAPI fg_err | fg_release_plot (fg_plot pPlot)
| Destroy plot object.
FGAPI fg_err | fg_set_plot_color (fg_plot pPlot, const float pRed, const float pGreen, const float pBlue, const float pAlpha)
| Set the color of line graph(plot).
FGAPI fg_err | fg_set_plot_legend (fg_plot pPlot, const char *pLegend)
| Set plot legend.
FGAPI fg_err | fg_set_plot_marker_size (fg_plot pPlot, const float pMarkerSize)
| Set global marker size.
FGAPI fg_err | fg_get_plot_vertex_buffer (unsigned *pOut, const fg_plot pPlot)
| Get the resource identifier for vertices buffer.
FGAPI fg_err | fg_get_plot_color_buffer (unsigned *pOut, const fg_plot pPlot)
| Get the resource identifier for colors buffer.
FGAPI fg_err | fg_get_plot_alpha_buffer (unsigned *pOut, const fg_plot pPlot)
| Get the resource identifier for alpha values buffer.
FGAPI fg_err | fg_get_plot_radii_buffer (unsigned *pOut, const fg_plot pPlot)
| Get the resource identifier for markers radii buffer.
FGAPI fg_err | fg_get_plot_vertex_buffer_size (unsigned *pOut, const fg_plot pPlot)
| Get the vertices buffer size in bytes.
FGAPI fg_err | fg_get_plot_color_buffer_size (unsigned *pOut, const fg_plot pPlot)
| Get the colors buffer size in bytes.
FGAPI fg_err | fg_get_plot_alpha_buffer_size (unsigned *pOut, const fg_plot pPlot)
| Get the alpha values buffer size in bytes.
FGAPI fg_err | fg_get_plot_radii_buffer_size (unsigned *pOut, const fg_plot pPlot)
| Get the markers buffer size in bytes.

## Detailed Description

## Function Documentation

## fg_create_plot()

FGAPI fg_err fg_create_plot | ( | fg_plot * | pPlot,
|  | const unsigned | pNPoints,
|  | const fg_dtype | pType,
|  | const fg_chart_type | pChartType,
|  | const fg_plot_type | pPlotType,
|  | const fg_marker_type | pMarkerType )

Create a Plot object.

Parameters

  [out] | pPlot | will be set to plot handle upon creating the plot object
  [in] | pNPoints | is number of data points to display
  [in] | pType | takes one of the values of fg_dtype that indicates the integral data type of plot data
  [in] | pChartType | dictates the dimensionality of the chart
  [in] | pPlotType | dictates the type of plot/graph, it can take one of the values of fg_plot_type
  [in] | pMarkerType | indicates which symbol is rendered as marker. It can take one of the values of fg_marker_type.

Returns
  fg_err error code

## fg_get_plot_alpha_buffer()

FGAPI fg_err fg_get_plot_alpha_buffer | ( | unsigned * | pOut,
|  | const fg_plot | pPlot )

Get the resource identifier for alpha values buffer.

Parameters

  [out] | pOut | will have the buffer identifier after this function is called
  [in] | pPlot | is the plot handle

Returns
  fg_err error code

## fg_get_plot_alpha_buffer_size()

FGAPI fg_err fg_get_plot_alpha_buffer_size | ( | unsigned * | pOut,
|  | const fg_plot | pPlot )

Get the alpha values buffer size in bytes.

Parameters

  [out] | pOut | will have the buffer size in bytes after this function is called
  [in] | pPlot | is the plot handle

Returns
  fg_err error code

## fg_get_plot_color_buffer()

FGAPI fg_err fg_get_plot_color_buffer | ( | unsigned * | pOut,
|  | const fg_plot | pPlot )

Get the resource identifier for colors buffer.

Parameters

  [out] | pOut | will have the buffer identifier after this function is called
  [in] | pPlot | is the plot handle

Returns
  fg_err error code

## fg_get_plot_color_buffer_size()

FGAPI fg_err fg_get_plot_color_buffer_size | ( | unsigned * | pOut,
|  | const fg_plot | pPlot )

Get the colors buffer size in bytes.

Parameters

  [out] | pOut | will have the buffer size in bytes after this function is called
  [in] | pPlot | is the plot handle

Returns
  fg_err error code

## fg_get_plot_radii_buffer()

FGAPI fg_err fg_get_plot_radii_buffer | ( | unsigned * | pOut,
|  | const fg_plot | pPlot )

Get the resource identifier for markers radii buffer.

Parameters

  [out] | pOut | will have the buffer identifier after this function is called
  [in] | pPlot | is the plot handle

Returns
  fg_err error code

## fg_get_plot_radii_buffer_size()

FGAPI fg_err fg_get_plot_radii_buffer_size | ( | unsigned * | pOut,
|  | const fg_plot | pPlot )

Get the markers buffer size in bytes.

Parameters

  [out] | pOut | will have the buffer size in bytes after this function is called
  [in] | pPlot | is the plot handle

Returns
  fg_err error code

## fg_get_plot_vertex_buffer()

FGAPI fg_err fg_get_plot_vertex_buffer | ( | unsigned * | pOut,
|  | const fg_plot | pPlot )

Get the resource identifier for vertices buffer.

Parameters

  [out] | pOut | will have the buffer identifier after this function is called
  [in] | pPlot | is the plot handle

Returns
  fg_err error code

## fg_get_plot_vertex_buffer_size()

FGAPI fg_err fg_get_plot_vertex_buffer_size | ( | unsigned * | pOut,
|  | const fg_plot | pPlot )

Get the vertices buffer size in bytes.

Parameters

  [out] | pOut | will have the buffer size in bytes after this function is called
  [in] | pPlot | is the plot handle

Returns
  fg_err error code

## fg_release_plot()

FGAPI fg_err fg_release_plot | ( | fg_plot | pPlot | ) |

Destroy plot object.

Parameters

  [in] | pPlot | is the plot handle

Returns
  fg_err error code

## fg_retain_plot()

FGAPI fg_err fg_retain_plot | ( | fg_plot * | pOut,
|  | fg_plot | pIn )

Increase reference count of the resource.

Parameters

  [out] | pOut | is the new handle to existing resource
  [in] | pIn | is the existing resource handle

Returns
  fg_err error code

## fg_set_plot_color()

FGAPI fg_err fg_set_plot_color | ( | fg_plot | pPlot,
|  | const float | pRed,
|  | const float | pGreen,
|  | const float | pBlue,
|  | const float | pAlpha )

Set the color of line graph(plot).

Parameters

  [in] | pPlot | is the plot handle
  [in] | pRed | is Red component in range [0, 1]
  [in] | pGreen | is Green component in range [0, 1]
  [in] | pBlue | is Blue component in range [0, 1]
  [in] | pAlpha | is Blue component in range [0, 1]

Returns
  fg_err error code

## fg_set_plot_legend()

FGAPI fg_err fg_set_plot_legend | ( | fg_plot | pPlot,
|  | const char * | pLegend )

Set plot legend.

Parameters

  [in] | pPlot | is the plot handle
  [in] | pLegend |

Returns
  fg_err error code

## fg_set_plot_marker_size()

FGAPI fg_err fg_set_plot_marker_size | ( | fg_plot | pPlot,
|  | const float | pMarkerSize )

Set global marker size.

This size will be used for rendering markers if no per vertex marker sizes are provided. This value defaults to 10

Parameters

  [in] | pPlot | is the plot handle
  [in] | pMarkerSize | is the target marker size for scatter plots or line plots with markers

Returns
  fg_err error code