! Sets whether the axis uses a linear scale or a logarithmic scale. Note that this method controls the coordinate transformation. For logarithmic scales, you will likely also want to use a logarithmic tick spacing and labeling, which can be achieved by setting the axis ticker to an instance of \ref QCPAxisTickerLog : \snippet documentation/doc-code-snippets/mainwindow.cpp qcpaxisti
| 8367 | \ref setNumberPrecision |
| 8368 | */ |
| 8369 | void QCPAxis::setScaleType(QCPAxis::ScaleType type) |
| 8370 | { |
| 8371 | if (mScaleType != type) |
| 8372 | { |
| 8373 | mScaleType = type; |
| 8374 | if (mScaleType == stLogarithmic) |
| 8375 | setRange(mRange.sanitizedForLogScale()); |
| 8376 | mCachedMarginValid = false; |
| 8377 | emit scaleTypeChanged(mScaleType); |
| 8378 | } |
| 8379 | } |
| 8380 | |
| 8381 | /*! |
| 8382 | Sets the range of the axis. |
no test coverage detected