Forge
histogram.h
Go to the documentation of this file.
1 /*******************************************************
2  * Copyright (c) 2015-2019, ArrayFire
3  * All rights reserved.
4  *
5  * This file is distributed under 3-clause BSD license.
6  * The complete license agreement can be obtained at:
7  * http://arrayfire.com/licenses/BSD-3-Clause
8  ********************************************************/
9 
10 #pragma once
11 
12 #include <fg/defines.h>
13 
14 namespace internal
15 {
16 class _Histogram;
17 }
18 
19 namespace fg
20 {
21 
27 class Histogram {
28  private:
29  internal::_Histogram* value;
30 
31  public:
39  FGAPI Histogram(unsigned pNBins, dtype pDataType);
40 
46  FGAPI Histogram(const Histogram& other);
47 
51  FGAPI ~Histogram();
52 
58  FGAPI void setBarColor(fg::Color col);
59 
60 
68  FGAPI void setBarColor(float pRed, float pGreen, float pBlue);
69 
78  FGAPI void setAxesLimits(float pXmax, float pXmin, float pYmax, float pYmin);
79 
86  FGAPI void setAxesTitles(const char* pXTitle, const char* pYTitle);
87 
93  FGAPI float xmax() const;
94 
100  FGAPI float xmin() const;
101 
107  FGAPI float ymax() const;
108 
114  FGAPI float ymin() const;
115 
121  FGAPI unsigned vbo() const;
122 
128  FGAPI unsigned size() const;
129 
133  FGAPI internal::_Histogram* get() const;
134 };
135 
136 }
Bar graph to display data frequencey.
Definition: histogram.h:27
FGAPI ~Histogram()
Histogram Destructor.
Definition: CPUCopy.hpp:13
FGAPI Histogram(unsigned pNBins, dtype pDataType)
Creates a Histogram object.
FGAPI float xmin() const
Get X-Axis minimum value.
FGAPI float ymin() const
Get Y-Axis minimum value.
FGAPI unsigned size() const
Get the OpenGL Vertex Buffer Object resource size.
#define FGAPI
Definition: defines.h:32
dtype
Definition: defines.h:131
Definition: font.h:13
FGAPI float ymax() const
Get Y-Axis maximum value.
FGAPI void setBarColor(fg::Color col)
Set the color of bar in the bar graph(histogram)
FGAPI void setAxesTitles(const char *pXTitle, const char *pYTitle)
Set axes titles in histogram(bar chart)
Color
Definition: defines.h:120
FGAPI void setAxesLimits(float pXmax, float pXmin, float pYmax, float pYmin)
Set the chart axes limits.
FGAPI unsigned vbo() const
Get the OpenGL Vertex Buffer Object identifier.
FGAPI float xmax() const
Get X-Axis maximum value.