#include <mathplot.h>
Public Member Functions | |
| mpScaleY (wxString name=wxT("Y"), int flags=mpALIGN_CENTER, bool ticks=true) | |
| virtual void | Plot (wxDC &dc, mpWindow &w) |
| virtual bool | HasBBox () |
| void | SetAlign (int align) |
| void | SetTicks (bool ticks) |
| bool | GetTicks () |
| void | SetLabelFormat (const wxString &format) |
| const wxString & | SetLabelFormat () |
Protected Attributes | |
| int | m_flags |
| Flag for axis alignment. | |
| bool | m_ticks |
| Flag to toggle between ticks or grid. | |
| wxString | m_labelFormat |
| Format string used to print labels. | |
Plot layer implementing a y-scale ruler. If align is set to mpALIGN_CENTER, the ruler is fixed at X=0 in the coordinate system. If the align is set to mpALIGN_TOP or mpALIGN_BOTTOM, the axis is always drawn respectively at top or bottom of the window. A label is plotted at the top-right hand of the ruler. The scale numbering automatically adjusts to view and zoom factor.
| mpScaleY::mpScaleY | ( | wxString | name = wxT("Y"), |
|
| int | flags = mpALIGN_CENTER, |
|||
| bool | ticks = true | |||
| ) |
| name | Label to plot by the ruler | |
| flags | Set position of the scale respect to the window. | |
| ticks | Select ticks or grid. Give TRUE (default) for drawing axis ticks, FALSE for drawing the grid |
References mpLAYER_AXIS.
| bool mpScaleY::GetTicks | ( | ) | [inline] |
Get Y axis ticks or grid
| virtual bool mpScaleY::HasBBox | ( | ) | [inline, virtual] |
| void mpScaleY::Plot | ( | wxDC & | dc, | |
| mpWindow & | w | |||
| ) | [virtual] |
Layer plot handler. This implementation will plot the ruler adjusted to the visible area.
Implements mpLayer.
References mpWindow::GetDesiredYmax(), mpWindow::GetDesiredYmin(), mpWindow::GetMarginBottom(), mpWindow::GetMarginLeft(), mpWindow::GetMarginRight(), mpWindow::GetMarginTop(), mpWindow::GetPosY(), mpWindow::GetScaleY(), mpWindow::GetScrX(), mpWindow::GetScrY(), mpLayer::m_drawOutsideMargins, m_flags, mpLayer::m_font, m_labelFormat, mpLayer::m_name, mpLayer::m_pen, m_ticks, mpLayer::m_visible, mpALIGN_BORDER_LEFT, mpALIGN_BORDER_RIGHT, mpALIGN_CENTER, mpALIGN_LEFT, mpALIGN_RIGHT, mpLN10, mpMIN_Y_AXIS_LABEL_SEPARATION, mpWindow::x2p(), and Y_BORDER_SEPARATION.
| void mpScaleY::SetAlign | ( | int | align | ) | [inline] |
Set Y axis alignment.
| align | alignment (choose between mpALIGN_BORDER_LEFT, mpALIGN_LEFT, mpALIGN_CENTER, mpALIGN_RIGHT, mpALIGN_BORDER_RIGHT) |
| const wxString& mpScaleY::SetLabelFormat | ( | ) | [inline] |
Get Y axis Label format.
| void mpScaleY::SetLabelFormat | ( | const wxString & | format | ) | [inline] |
Set Y axis Label format.
| format | The format string |
| void mpScaleY::SetTicks | ( | bool | ticks | ) | [inline] |
Set Y axis ticks or grid
| ticks | TRUE to plot axis ticks, FALSE to plot grid. |
int mpScaleY::m_flags [protected] |
Flag for axis alignment.
Referenced by Plot().
wxString mpScaleY::m_labelFormat [protected] |
Format string used to print labels.
Referenced by Plot().
bool mpScaleY::m_ticks [protected] |
Flag to toggle between ticks or grid.
Referenced by Plot().