MCPcopy Create free account
hub / github.com/CieNTi/serial_port_plotter / setCell

Method setCell

qcustomplot/qcustomplot.cpp:25312–25324  ·  view source on GitHub ↗

! Sets the data of the cell with indices \a keyIndex and \a valueIndex to \a z. The indices enumerate the cells starting from zero, up to the map's size-1 in the respective dimension (see \ref setSize). In the standard plot configuration (horizontal key axis and vertical value axis, both not range-reversed), the cell with indices (0, 0) is in the bottom left corner and the cell with

Source from the content-addressed store, hash-verified

25310 \see setData, setSize
25311*/
25312void QCPColorMapData::setCell(int keyIndex, int valueIndex, double z)
25313{
25314 if (keyIndex >= 0 && keyIndex < mKeySize && valueIndex >= 0 && valueIndex < mValueSize)
25315 {
25316 mData[valueIndex*mKeySize + keyIndex] = z;
25317 if (z < mDataBounds.lower)
25318 mDataBounds.lower = z;
25319 if (z > mDataBounds.upper)
25320 mDataBounds.upper = z;
25321 mDataModified = true;
25322 } else
25323 qDebug() << Q_FUNC_INFO << "index out of bounds:" << keyIndex << valueIndex;
25324}
25325
25326/*!
25327 Sets the alpha of the color map cell given by \a keyIndex and \a valueIndex to \a alpha. A value

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected