PDA

View Full Version : plotting just points and without any lines between them



Alex22
16th December 2015, 15:44
Hi,
(I have asked my question here (http://www.qtcentre.org/threads/64586-is-it-possible-to-plot-points-without-connecting-points-with-line) and sorry for bad position selecting for asking. I think here is suitable for my basic question).

I have two questions. 1- when plotting like below example, points be connected together by lines. I need the points be plotted and there be no line. 2- my data is too huge and i want to use float instead of double but setSamples function gives two "QVector< double > &" . is it possible to use QVector< float > & ???
for example:


QVector<double> v(10);
QwtPlot p;
QwtPlotCurve c;

v<<0<<1<<2<<3<<4<<5<<6<<7<<8<<9;//1-is it possible only this points be showed without any line between them?

c.setSamples(v, v);//2-how could i use Qvector<float> instead of Qvector<double>?
c.attach(&p);

p.show();


thanks for any help

anda_skoa
16th December 2015, 17:27
QPainter::drawPoints?

Cheers,
_

Alex22
16th December 2015, 17:51
QPainter::drawPoints?

Cheers,
_

thanks for answering. but i need a function in QWT. Could you help me about using Qvector<float> instead of Qvector<double>, that i explained above please?

anda_skoa
16th December 2015, 18:57
Sorry, no idea about QWT.

Cheers,
_