generating graph with unequal intervals using QCustomPlot in Qt
I am able to generate the graph with equal intervals on both the axis using QCustomPlot .But i need to generate dynamically with unequal intervals.
How can we generate graph with unequal intervals in x and y axis using QCustomPlot.
Re: generating graph with unequal intervals using QCustomPlot in Qt
QCustomPlot is not part of Qt, it is an external library. I suggest you go to the QCustomPlot forum and ask there.
Edit - which I see you did, so never mind. You probably want this:
Quote:
void QCPAxis::setTickVector ( const QVector< double > & vec )
If you want full control over what ticks (and possibly labels) the axes show, this function is used to set the coordinates at which ticks will appear. setAutoTicks must be disabled, else the provided tick vector will be overwritten with automatically generated tick coordinates upon replot. The labels of the ticks can be generated automatically when setAutoTickLabels is left enabled. If it is disabled, you can set the labels manually with setTickVectorLabels.
vec is a vector containing the positions of the ticks, in plot coordinates.
Re: generating graph with unequal intervals using QCustomPlot in Qt
See the code snippet for the Bar Chart Demo on the QCustomPlot front page.