|
| | Axis (Drawable *parent, const bfloat2_t &area) |
| | create a new Axis contained in the given Figure More...
|
| |
|
TRASE_DISPATCH_BACKENDS const Limits & | limits () const |
| | returns the current Aesthetic limits
|
| |
|
Limits & | limits () |
| | returns the current Aesthetic limits, allowing them to be set manually
|
| |
|
void | xlim (std::array< float, 2 > xlimits) |
| | a helper function to set the x Aesthetic limits manually
|
| |
|
void | ylim (std::array< float, 2 > ylimits) |
| | a helper function to set the y Aesthetic limits manually
|
| |
|
void | xlabel (const char *string) |
| | set the label on the x axis
|
| |
|
void | ylabel (const char *string) |
| | set the label on the y axis
|
| |
|
void | title (const char *string) |
| | set the title of the Axis
|
| |
|
std::shared_ptr< Legend > | legend () |
| | show a legend identifying each Geometry in the Axis
|
| |
| std::shared_ptr< Geometry > | points (const DataWithAesthetic &data, const Transform &transform=Transform(Identity())) |
| | Create a new Points plot and return a shared pointer to it. More...
|
| |
| std::shared_ptr< Geometry > | rectangle (const DataWithAesthetic &data, const Transform &transform=Transform(Identity())) |
| | Create a new Rectangle plot and return a shared pointer to it. More...
|
| |
| std::shared_ptr< Geometry > | line (const DataWithAesthetic &data, const Transform &transform=Transform(Identity())) |
| | Create a new Line and return a shared pointer to it. More...
|
| |
| std::shared_ptr< Geometry > | histogram (const DataWithAesthetic &data, const Transform &transform=Transform(BinX())) |
| | Create a new histogram and return a shared pointer to it. More...
|
| |
| std::shared_ptr< Geometry > | plot (int n) |
| | Return a shared pointer to an existing plot. More...
|
| |
|
template<typename AnimatedBackend > |
| void | draw (AnimatedBackend &backend) |
| |
|
template<typename Backend > |
| void | draw (Backend &backend, float time) |
| |
|
template<typename Aesthetic > |
| float | from_display (float i) const |
| | convert from display coordinates to data coordinates, using the given Aesthetic
|
| |
|
template<typename Aesthetic > |
| float | to_display (float i) const |
| | convert from data coordinates to display coordinates, using the given Aesthetic
|
| |
| void | set_ticks (Vector< int, 2 > arg) |
| | set the number of ticks on this axis More...
|
| |
|
Vector< int, 2 > | get_ticks () const |
| | gets the number of ticks on this axis
|
| |
| | Drawable (Drawable *parent, const bfloat2_t &area_of_parent) |
| | constructs a Drawable under parent in the tree structure, and assigns it an drawable area given by area_of_parent More...
|
| |
|
void | resize (const bfloat2_t &parent_pixels) |
| | resize the drawable area (in raw pixels) using the parents area (in raw pixels)
|
| |
|
void | update_time_span (float time) |
| | if time is outside the current animation time span of this object then this time span is increased to include it
|
| |
|
void | add_frame_time (float time) |
| | adds a keyframe time to the animation
|
| |
| void | update_frame_info (float time) |
| | fills out m_frame_info using a given time More...
|
| |
| const FrameInfo & | get_frame_info () const |
| | returns the current FrameInfo More...
|
| |
|
const bfloat2_t & | pixels () const |
| | returns this objects drawable area in raw pixels
|
| |
|
const bfloat2_t & | area () const |
| | returns this objects drawable area as a ratio of the parents drawable area
|
| |
|
bfloat2_t & | area () |
| | returns this objects drawable area as a ratio of the parents drawable area
|
| |
|
Style & | style () noexcept |
| | returns modifiable current style
|
| |
|
const float & | time_span () const |
| | returns time span of the animation
|
| |
|
virtual void | dispatch (BackendSVG &file, float time)=0 |
| |
|
virtual void | dispatch (BackendSVG &file)=0 |
| |
|
template<typename AnimatedBackend > |
| void | draw (AnimatedBackend &backend) |
| | draw this object using the given AnimatedBackend
|
| |
|
template<typename Backend > |
| void | draw (Backend &backend, float time) |
| | draw this object using the given Backend
|
| |
An 2D axis that can contain zero or more Geometry objects.
Each axis stores minimum and maximum limits for each Aesthetic, these are used to both set the ticks displayed on the x and y axis, and to scale the drawn Geometry objects (how each Geometry is scaled depends on the specifics of the Geometry used). Each time a new Geometry is added to the Axis, it updates these limits using the limits of the its DataWithAestheic.
TODO: issue #87, the name of the Geometry class will probably change to Geometry in the future
An Axis can optionally contain:
- a title
- a label for the x axis
- a label for the y axis
- a legend that identifies each Geometry