Angka  0.0.1
A C library focusing on data manipulation and visualization
visual.h File Reference

the library for data visualization More...

Go to the source code of this file.

Data Structures

struct  s_color
 color struct More...
 
struct  s_plot_data
 plot data struct More...
 
struct  s_coord_double
 coordinate struct (double) More...
 
struct  s_coord_int
 coordinate struct (integer) More...
 
struct  s_canvas
 canvas struct More...
 
struct  s_figure
 figure struct More...
 

Macros

#define VRGB   255
 macro of the maximum RGB value More...
 

Typedefs

typedef enum e_canvas_type AgvCanvasType
 canvas numbering for visualization More...
 
typedef struct s_color AgxColor
 color struct More...
 
typedef struct s_plot_data AgxPlotData
 plot data struct More...
 
typedef struct s_coord_double AgxCoordDouble
 coordinate struct (double) More...
 
typedef struct s_coord_int AgxCoordInt
 coordinate struct (integer) More...
 
typedef struct s_canvas AgvCanvas
 canvas struct More...
 
typedef struct s_figure AgvFigure
 figure struct More...
 

Enumerations

enum  e_canvas_type { AGV_PLOT, AGV_SCATTER, AGV_IMAGE, AGV_CONTOUR }
 canvas numbering for visualization More...
 

Functions

void agv_color_pallete_set (AgxColor *clr, int index, int r, int g, int b, double a, double val)
 setting the color pallete of imshow canvas More...
 
AgvFigureagv_figure_new (int row, int col)
 create a new figure struct (should use agv_subplots instead) More...
 
void agv_figure_delete (AgvFigure **fig)
 delete a figure More...
 
AgvFigureagv_subplots (int row, int col)
 Create a figure with subplots definition. More...
 
AgvCanvasagv_set_canvas (AgvFigure *fig, int index)
 select a canvas from the existing figure More...
 
void agv_plot (AgvCanvas *can, AgxVector *vecx, AgxVector *vecy)
 plotting the data on a line More...
 
void agv_scatter (AgvCanvas *can, AgxVector *vecx, AgxVector *vecy)
 plotting the data on some scattering bullets More...
 
void agv_imshow (AgvCanvas *can, AgxMatrix *mat)
 imaging the matrix data More...
 
AgxColoragv_color_pallete_canvas_set_size (AgvCanvas *can, int line, int size)
 set the size of color pallete from the existing canvas More...
 
void agv_xlim (AgvCanvas *can, double min, double max)
 x limit values of the canvas More...
 
void agv_ylim (AgvCanvas *can, double min, double max)
 y limit values of the canvas More...
 
int agv_show (AgvFigure *fig)
 construct the figure and show it More...
 
void agv_set_color_alpha (AgvCanvas *can, int line, int red, int green, int blue, double alpha)
 set the color of plotting and scattering, and image (the color fill) More...
 
void agv_set_color_alpha_line (AgvCanvas *can, int line, int red, int green, int blue, double alpha)
 set the color of the boundary of scattering sircle and image More...
 
void agv_set_radius (AgvCanvas *can, int line, int radius)
 set the radius of scattering circle More...
 
void agv_set_linewidth (AgvCanvas *can, int line, int linewidth)
 set the thick of line, the boundary of image and scattering circle More...
 
void agv_set_grid (AgvCanvas *can, int boolean)
 true if showing grid, default is false More...
 

Detailed Description

the library for data visualization

Note
always use this header for using visual library libagv.a.

Macro Definition Documentation

◆ VRGB

#define VRGB   255

macro of the maximum RGB value

Typedef Documentation

◆ AgvCanvas

typedef struct s_canvas AgvCanvas

canvas struct

◆ AgvCanvasType

canvas numbering for visualization

◆ AgvFigure

typedef struct s_figure AgvFigure

figure struct

◆ AgxColor

typedef struct s_color AgxColor

color struct

◆ AgxCoordDouble

coordinate struct (double)

◆ AgxCoordInt

typedef struct s_coord_int AgxCoordInt

coordinate struct (integer)

◆ AgxPlotData

typedef struct s_plot_data AgxPlotData

plot data struct

Enumeration Type Documentation

◆ e_canvas_type

canvas numbering for visualization

Enumerator
AGV_PLOT 
AGV_SCATTER 
AGV_IMAGE 
AGV_CONTOUR 

Function Documentation

◆ agv_color_pallete_canvas_set_size()

AgxColor* agv_color_pallete_canvas_set_size ( AgvCanvas can,
int  line,
int  size 
)

set the size of color pallete from the existing canvas

Returns
NULL if error.

◆ agv_color_pallete_set()

void agv_color_pallete_set ( AgxColor clr,
int  index,
int  r,
int  g,
int  b,
double  a,
double  val 
)

setting the color pallete of imshow canvas

◆ agv_figure_delete()

void agv_figure_delete ( AgvFigure **  fig)

delete a figure

◆ agv_figure_new()

AgvFigure* agv_figure_new ( int  row,
int  col 
)

create a new figure struct (should use agv_subplots instead)

Note
need to be manually deleted using agv_figure_delete
Returns
AgvFigure, NULL if error.

◆ agv_imshow()

void agv_imshow ( AgvCanvas can,
AgxMatrix mat 
)

imaging the matrix data

◆ agv_plot()

void agv_plot ( AgvCanvas can,
AgxVector vecx,
AgxVector vecy 
)

plotting the data on a line

◆ agv_scatter()

void agv_scatter ( AgvCanvas can,
AgxVector vecx,
AgxVector vecy 
)

plotting the data on some scattering bullets

◆ agv_set_canvas()

AgvCanvas* agv_set_canvas ( AgvFigure fig,
int  index 
)

select a canvas from the existing figure

Note
it is used for the input of the other functions
Returns
NULL if error.

◆ agv_set_color_alpha()

void agv_set_color_alpha ( AgvCanvas can,
int  line,
int  red,
int  green,
int  blue,
double  alpha 
)

set the color of plotting and scattering, and image (the color fill)

◆ agv_set_color_alpha_line()

void agv_set_color_alpha_line ( AgvCanvas can,
int  line,
int  red,
int  green,
int  blue,
double  alpha 
)

set the color of the boundary of scattering sircle and image

◆ agv_set_grid()

void agv_set_grid ( AgvCanvas can,
int  boolean 
)

true if showing grid, default is false

◆ agv_set_linewidth()

void agv_set_linewidth ( AgvCanvas can,
int  line,
int  linewidth 
)

set the thick of line, the boundary of image and scattering circle

◆ agv_set_radius()

void agv_set_radius ( AgvCanvas can,
int  line,
int  radius 
)

set the radius of scattering circle

◆ agv_show()

int agv_show ( AgvFigure fig)

construct the figure and show it

Returns
0 if success, -1 if error.

◆ agv_subplots()

AgvFigure* agv_subplots ( int  row,
int  col 
)

Create a figure with subplots definition.

Returns
AgvFigure, NULL if error.

◆ agv_xlim()

void agv_xlim ( AgvCanvas can,
double  min,
double  max 
)

x limit values of the canvas

◆ agv_ylim()

void agv_ylim ( AgvCanvas can,
double  min,
double  max 
)

y limit values of the canvas