Marx2DGraph provides 2D graphing for Marsyas where the ordinates are given by a marsyas realvec object and the abscissa a per sample spacing. Plot types are give in Marx2DGraph.h and include points, precsion, linear and polynomial interpolation. More...
#include <Marx2DGraph.h>
Public Member Functions | |
| void | addLabel (std::string) |
| addLabel | |
| void | displayXaxis (bool) |
| displayXaxis | |
| Marx2DGraph (int size=0, QWidget *parent=0) | |
| The real constructor. | |
| Marx2DGraph (QWidget *parent=0) | |
| A default constructor. | |
| void | setAntialias (bool) |
| setAntialias | |
| void | setAxisDisplayType (int) |
| setAxisDisplayType | |
| void | setBGColor (QColor) |
| setBGColor | |
| bool | setBuffer (Marsyas::realvec &) |
| setBuffer | |
| void | setGraphDataColor (QColor) |
| setGraphDataColor | |
| void | setGraphDataLineSize (float) |
| setGraphDataLineSize | |
| void | setGraphDataPointSize (float) |
| setGraphDataPointSize | |
| void | setGraphDataPointType (int) |
| setGraphDataPointType | |
| void | setGraphLabelsAndAxisColor (QColor) |
| setGraphLabelsAndAxisColor | |
| void | setPlotType (int) |
| setPlotType | |
| void | setShowAxisScale (bool) |
| setShowAxisScale | |
| void | setXAxisLabel (std::string) |
| setXAxisLabel | |
| void | setXAxisLabelOn (bool) |
| setXAxisLabel | |
| void | setYAxisLabel (std::string) |
| setYAxisLabel | |
| void | setYAxisLabelOn (bool) |
| setYAxisLabel | |
Marx2DGraph provides 2D graphing for Marsyas where the ordinates are given by a marsyas realvec object and the abscissa a per sample spacing. Plot types are give in Marx2DGraph.h and include points, precsion, linear and polynomial interpolation.
Definition at line 41 of file Marx2DGraph.h.
| Marx2DGraph | ( | QWidget * | parent = 0 |
) |
A default constructor.
A default constructor when buffer size isn't otherwise specified.
Definition at line 31 of file Marx2DGraph.cpp.
| Marx2DGraph | ( | int | size = 0, |
|
| QWidget * | parent = 0 | |||
| ) |
The real constructor.
The real constructor
| size | an integer giving buffer size | |
| parent | a pointer to the parent widget |
Definition at line 46 of file Marx2DGraph.cpp.
| void addLabel | ( | std::string | lb | ) |
addLabel
Give the graph a label and update the graphic.
| lb | a string providing the label |
Definition at line 431 of file Marx2DGraph.cpp.
| void displayXaxis | ( | bool | tf | ) |
displayXaxis
Toggles whether the X axis is drawn.
| bool | on/off |
Definition at line 107 of file Marx2DGraph.cpp.
| void setAntialias | ( | bool | tf | ) |
setAntialias
Toggles antialiasing on and off. When rapidly redrawing plot buffers, such as in plotting realtime audio output, antialias will probably need to be turned off, which is the default configuration.
Definition at line 299 of file Marx2DGraph.cpp.
| void setAxisDisplayType | ( | int | type | ) |
setAxisDisplayType
Controls how the axis will be drawn: enum { CONNECTED, BROKEN }.
| type | an int given by the enumeration above |
Definition at line 184 of file Marx2DGraph.cpp.
| void setBGColor | ( | QColor | c | ) |
setBGColor
Set the background color of the graph. The default color is white.
| c | a QColor object |
Definition at line 226 of file Marx2DGraph.cpp.
| bool setBuffer | ( | Marsyas::realvec & | rv | ) |
setBuffer
Set the buffer and automatically update the graphics.
| *b | a pointer to an array of floats | |
| s | the size of the buffer |
Definition at line 330 of file Marx2DGraph.cpp.
References realvec::getSize().
| void setGraphDataColor | ( | QColor | c | ) |
setGraphDataColor
Change the plot color.
| c | a QColor object |
Definition at line 197 of file Marx2DGraph.cpp.
| void setGraphDataLineSize | ( | float | p | ) |
setGraphDataLineSize
Set the graph line thickness when plotting style is LINEAR_INTERPOLATION or POLYNOMIAL_INTERPOLATION.
| p | a float such as magnitude 2.0 |
Definition at line 270 of file Marx2DGraph.cpp.
| void setGraphDataPointSize | ( | float | p | ) |
setGraphDataPointSize
Set the point size when the graph type is POINT.
| p | a float such as magnitude 5.0 |
Definition at line 240 of file Marx2DGraph.cpp.
| void setGraphDataPointType | ( | int | t | ) |
setGraphDataPointType
Set the point style when the graph type is POINT. Options are given in the enumeration: enum { CIRCLES, SQUARES, XS };
| t | an int corresponding to the above enum |
Definition at line 255 of file Marx2DGraph.cpp.
| void setGraphLabelsAndAxisColor | ( | QColor | c | ) |
setGraphLabelsAndAxisColor
Change the labels and axis colors, ie. labels and axis are displayed in the same color
| c | a QColor object |
Definition at line 212 of file Marx2DGraph.cpp.
| void setPlotType | ( | int | type | ) |
setPlotType
Choose the style of the plot: enum { POINTS, PRECISION, LINEAR_INTERPOLATION, POLYNOMIAL_INTERPOLATION }.
| type | an int corresponding to the above enumeration |
Definition at line 285 of file Marx2DGraph.cpp.
| void setShowAxisScale | ( | bool | tf | ) |
setShowAxisScale
Toggle the displaying of axis scale label.
| bool | true/false is on/off respectively |
Definition at line 313 of file Marx2DGraph.cpp.
| void setXAxisLabel | ( | std::string | m | ) |
setXAxisLabel
Add a label below and center of the x axis.
| string | message |
Definition at line 121 of file Marx2DGraph.cpp.
| void setXAxisLabelOn | ( | bool | tf | ) |
setXAxisLabel
Add a label below and center of the x axis.
| string | message |
Definition at line 149 of file Marx2DGraph.cpp.
| void setYAxisLabel | ( | std::string | m | ) |
setYAxisLabel
Add a label below and center of the y axis.
| string | message |
Definition at line 135 of file Marx2DGraph.cpp.
| void setYAxisLabelOn | ( | bool | tf | ) |
setYAxisLabel
Add a label below and center of the y axis.
| string | message |
Definition at line 166 of file Marx2DGraph.cpp.
1.5.6