I'm sub classing QwtPlotItem, and when i attached it to the plot, im trying to auto scale myPlotItem and the Y and X-Axis

so the the item that i attached will be in the visible area of the plot and I don't need to zoom out and pan around to find it.

so I'm doing :

Qt Code:
  1. myItem->setItemAttribute(QwtPlotItem::AutoScale,true);
  2. myPlot->setAxisAutoScale(QwtPlot::xBottom);
  3. myPlot->setAxisAutoScale(QwtPlot::yLeft);
To copy to clipboard, switch view to plain text mode 

but its still not working and still need to zoom out to find my item.

what else i need to do to achieve this ??

Thanks