
Originally Posted by
Tomas_Zajic
I spent the whole day over this issue and I'm stuck :Confused
Qwt is open source and looking at the code makes a lot of sense, when facing such a situation.
F.e. when checking QwtSyntheticPointData::x() you can see easily, that the step size is calculated wrong. Instead
of "interval.width() / d_size" it has to be "interval.width() / ( d_size - 1 )".
Fixed in all relevant branches ( including 6.1 ) - if you don't want or can't use Qwt from SVN you can simple overload your x() method:
virtual CosinusData::x( uint index )
{
const double dx = interval().width() / ( size() - 1 );
return interval.minValue() + index * dx;
}
virtual CosinusData::x( uint index )
{
const double dx = interval().width() / ( size() - 1 );
return interval.minValue() + index * dx;
}
To copy to clipboard, switch view to plain text mode
Uwe
Bookmarks