Hello All,
I am very new to Qwt. To support our current application I am looking for the solution to my below problem.
I have an application data plotted using qwt and it works fine. I refresh my data every 5 seconds.
I have set lower and upper bound along with Major steps size using "setAxisScale"
It displays the label of the Major ticks automatically, However I would like to set the scale such that it displays the time in round figure.
Currently it displays the time randomly (at least to me!!) for example, I have given the step size as 1 Hour so it displays the label something like,
12.01, 13.01, 14.01... etc
How can I modify such that my xaxes adjust Major ticks to displays time in round figure like 12.00, 13.00, 14.00 ??
Can I set the offset for first Major tick to round the time and other Major ticks fall in line based on step size?
plot-1.jpg
I have overloaded the label function to get the time in HH:mm format and it works fine.
*** Here, baseSeconds are the lower bound value of my graphQt Code:
{ { quint32 displytime = (int)v; if (displytime == 0) { } else { displytime = quint32(v) - m_pd.baseSeconds; displytime *= m_pd.dataReso.width(); displytime += m_pd.baseSeconds; } std::string sp_temp = t.toString(format).toStdString(); return t.toString(format); } };To copy to clipboard, switch view to plain text mode
However I assume that there would be some setting in the plot which will help me get the scale drawn on the hourly rounded time points.
I am not just looking at the the changing label but label should be appropriate according to the graph position
Thanks
/SP
Bookmarks