! Returns the axis with the given \a index on the axis rect side specified with \a type. \see axisCount, axes */
| 17621 | \see axisCount, axes |
| 17622 | */ |
| 17623 | QCPAxis *QCPAxisRect::axis(QCPAxis::AxisType type, int index) const |
| 17624 | { |
| 17625 | QList<QCPAxis*> ax(mAxes.value(type)); |
| 17626 | if (index >= 0 && index < ax.size()) |
| 17627 | { |
| 17628 | return ax.at(index); |
| 17629 | } else |
| 17630 | { |
| 17631 | qDebug() << Q_FUNC_INFO << "Axis index out of bounds:" << index; |
| 17632 | return nullptr; |
| 17633 | } |
| 17634 | } |
| 17635 | |
| 17636 | /*! |
| 17637 | Returns all axes on the axis rect sides specified with \a types. |