QCustomPlot Discussion and Comments

Zoom with buttonsReturn to overview

hello!!! and Thanks for your attention.... i´m new with Qcostumplot, and i need to zoom a plot but not with the mouse wheel, any ideas if there is an easy way to simulate this event with buttons?

Use scaleRange on the axis you want to scale.
This will for example zoom in at the center of the horizontal axis. 0.85 is the scale factor used for scroll wheel zooming.

    ui->plot->xAxis->scaleRange(.85, ui->plot->xAxis->range().center());

Thanks Henrik ... very usefull !!

for zoom out feature is there any similar method