PDA

View Full Version : Qwt How to plot our specific symbols?



sonulohani
18th May 2012, 13:02
Sir,
I have a query. That in below image i have already created the graph. Now i am unable to plot the symbol. The symbol should be plot only when the graph is high.
So please tell me. And also i have to use our own symbol image to plot. So please tell me ?????

7737

ChrisW67
18th May 2012, 23:36
QwtPlotMarker (http://qwt.sourceforge.net/class_qwt_plot_marker.html), QwtSymbol (http://qwt.sourceforge.net/class_qwt_symbol.html) and the examples seem like an obvious starting point. How about you tell us what you have tried.

sonulohani
21st May 2012, 07:58
I have tried for the QwtSymbols, but it is plotting all the values on the curve, I want to plot only on the specific values. Could you please give an example on QwtPlotMarker so that i can figure out that how would it be done?

ChrisW67
28th May 2012, 07:48
If Qwt plots a marker for every point in a data set then why not give it a second data set that only includes the points you want it to plot? Derive the new data set from the old.

You could also look at the bode example that comes with Qwt. It puts a marker and line at the peak of a plot.

To use an arbitrary pixmap as a symbol subclass QwtSymbol and provide your subclass with a QwtSymbol::drawSymbols() override that paints a pixmap at each point. You will also need a method to specify the pixmap to use and to return something valid for QwtSymbol::boundingSize ().