Re: how to use qwtplotzoomer to zoom only 1 axis?
David Stranz <David_Stranz <at> MassSpec.com>
2011-01-05 02:00:27 GMT
Derive a class from QwtPlotZoomer and reimplement the zoom( const
QwtDoubleRect & ) slot. Change it so that the y coordinates of the top
left and bottom right points are equal to the y points of the zoomBase()
rect, then call QwtPlotZoomer::zoom() with the new rect.
void MyQwtPlotZoomer::zoom( const QwtDoubleRect & rect )
{
QwtDoubleRect newRect;
const QwtDoubleRect & baseRect = zoomBase();
newRect.setCoords( rect.left(), baseRect.top(), rect.right(),
baseRect.bottom();
QwtPlotZoomer::zoom( newRect );
}
_______________________________________________________________
David Stranz, Ph.D. david_stranz <at> MassSpec.com
Sierra Analytics, Inc.
5815 Stoddard Road, Suite 601
Modesto, CA 95356
Tel: (209) 545-8508
http://www.massspec.com
_______________________________________________________________
On 1/4/2011 4:36 PM, 机械唯物主义 : linjunhalida wrote:
> to be detailed, I use both Y axis, and I do not want zoomer to change
> any of them.
>
> 2011/1/5 机械唯物主义 : linjunhalida<linjunhalida <at> gmail.com>:
>> hello, I want use zoomer to zoom only XBottom axis, and leave Y alone,
>> any idea how to do this?
>> if there is no easy way, I should try qwtplotpicker..
>>
>
> ------------------------------------------------------------------------------
> Learn how Oracle Real Application Clusters (RAC) One Node allows customers
> to consolidate database storage, standardize their database environment, and,
> should the need arise, upgrade to a full multi-node Oracle RAC database
> without downtime or disruption
> http://p.sf.net/sfu/oracle-sfdevnl
> _______________________________________________
> qwt-interest mailing list
> qwt-interest <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/qwt-interest
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
qwt-interest mailing list
qwt-interest <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qwt-interest