From: Dave C. <dav...@ce...> - 2005-05-02 04:09:10
|
Ok, thanks Micha. I have successfully implemented your suggestion. Apologies for the poor subject line to the previous post. Gold star for all your work, and thanks for the help. Dave. -----Original Message----- From: qwt...@li... [mailto:qwt...@li...] On Behalf Of qwt...@li... Sent: Saturday, 30 April 2005 1:22 PM To: qwt...@li... Subject: qwtplot3d-interest digest, Vol 1 #34 - 2 msgs Send qwtplot3d-interest mailing list submissions to qwt...@li... To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/qwtplot3d-interest or, via email, send a message with subject or body 'help' to qwt...@li... You can reach the person managing the list at qwt...@li... When replying, please edit your Subject line so it is more specific than "Re: Contents of qwtplot3d-interest digest..." Today's Topics: 1. RE: qwtplot3d-interest digest, Vol 1 #33 - 3 msgs (Dave Cooper) 2. Re: qwtplot3d-interest digest, Vol 1 #33 - 3 msgs (Micha Bieber) --__--__-- Message: 1 From: "Dave Cooper" <dav...@ce...> To: <qwt...@li...> Subject: RE: qwtplot3d-interest digest, Vol 1 #33 - 3 msgs Date: Fri, 29 Apr 2005 14:33:16 +1000 Reply-To: qwt...@li... Hi Micha and friends, I have implemented a similar scaling function as described in the emails below (Scaling of surface plots). The scaling works great, however I am left with a problem regarding the axes' scales. If I make a dataset that is of size (x = 4, y = 1000, z = 1000), then using the setScale method and algorithm documented below I can (correctly) show a "cube" of data (even though the dataset is actually a rectangle). However the scales on the y and z axes are blown completely out of proportion (i.e. the lines out from the data to the string labels are exceptionally long). Can anyone point me in a direction to correctly scale the axes lines? If anyone wants a screen shot then let me know and I'll forward it (I don't have access to the internet to upload it to a web page here at work). I apologise if this has already been answered on a forum, I can't get the internet here. Thanks for your help, Dave Cooper (Canberra, Australia) -----Original Message----- From: qwt...@li... [mailto:qwt...@li...] On Behalf Of qwt...@li... Sent: Tuesday, 26 April 2005 1:31 PM To: qwt...@li... Subject: qwtplot3d-interest digest, Vol 1 #33 - 3 msgs Send qwtplot3d-interest mailing list submissions to qwt...@li... To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/qwtplot3d-interest or, via email, send a message with subject or body 'help' to qwt...@li... You can reach the person managing the list at qwt...@li... When replying, please edit your Subject line so it is more specific than "Re: Contents of qwtplot3d-interest digest..." Today's Topics: 1. Scaling of surface plots (Stefan Gerlach) 2. Re: Scaling of surface plots (Micha Bieber) 3. Re: Scaling of surface plots (Keith, Todd) -- __--__-- Message: 1 From: Stefan Gerlach <ge...@mb...> Organization: MBI To: qwt...@li... Subject: Scaling of surface plots Date: Mon, 25 Apr 2005 09:59:05 +0200 --Boundary-02=_VNKbCYSmBbjNgLj Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi,=20 =20 I have some difficulties to scale surface plots to the correct size.=20 I'm using "loadFromData(data,cols,rows,0,cols,0,rows)"=20 to make a surface plot with different cols/rows combinations. Depending on rows/cols and zrange of the data the plot is very tiny or too= =20 big. I tried some combinations of setScale(1/rows,1/cols,1/zrange), etc.= =20 but had no luck to find the right combination.=20 =20 Is there a way to scale the surface plot to the correct size (depending on= =20 rows,cols,zrange)? How can i scale the plot to have all axes with the same= =20 size (aspect ratio) and always fit on the screen? =20 Thanks in advance. Stefan Gerlach --Boundary-02=_VNKbCYSmBbjNgLj Content-Type: application/pgp-signature Content-Description: signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQBCbKNVa9g3y2xF0AARAldBAJ9m8J24aEeHZPt4dy0+F/m9lviltQCfUqDB 3KFINp0tJD2jrN4BTjnS/Pg= =IdWw -----END PGP SIGNATURE----- --Boundary-02=_VNKbCYSmBbjNgLj-- -- __--__-- Message: 2 Date: Mon, 25 Apr 2005 14:30:59 +0200 From: Micha Bieber <kri...@us...> To: qwt...@li... Subject: Re: Scaling of surface plots Stefan, please check the forum for an answer. Micha -- -- __--__-- Message: 3 Subject: Re: Scaling of surface plots Date: Mon, 25 Apr 2005 09:22:54 -0500 From: "Keith, Todd" <ke...@um...> To: <qwt...@li...> Reply-To: qwt...@li... Consider something like this ... ***** Let minX and maxX be the minimum and maximum value, respectively, of = your data along the x-Axis Let minY and maxY be the minimum and maximum value, respectively, of = your data along the y-Axis Let minZ and maxZ be the minimum and maximum value, respectively, of = your data along the z-Axis ***** double rangeX =3D fabs(maxX - minX); double rangeY =3D fabs(maxY - minY); double rangeZ =3D fabs(maxZ - minZ); double maxRange =3D rangeX; if (rangeY > maxRange) maxRange =3D rangeY; if (rangeZ > maxRange) maxRange =3D rangeZ; double scaleX =3D maxRange / rangeX; double scaleY =3D maxRange / rangeY; double scaleZ =3D maxRange / rangeZ; double maxScale =3D scaleX; if (scaleY > maxScale) maxScale =3D scaleY; if (scaleZ > maxScale) maxScale =3D scaleZ; setScale(scaleX, scaleY, scaleZ); -- __--__-- _______________________________________________ qwtplot3d-interest mailing list qwt...@li... https://lists.sourceforge.net/lists/listinfo/qwtplot3d-interest End of qwtplot3d-interest Digest --__--__-- Message: 2 Date: Fri, 29 Apr 2005 09:54:49 +0200 From: Micha Bieber <kri...@us...> To: qwt...@li... Subject: Re: qwtplot3d-interest digest, Vol 1 #33 - 3 msgs Reply-To: qwt...@li... Friday, April 29, 2005, 06:33:16, Dave Cooper wrote: > out of proportion (i.e. the lines out from the data to the string labels > are exceptionally long). Yes, it is a known issue. The currently implemented automatism handles these cases not yet satisfying. It's one of the small points for version 0.3.0. However, you should be able to resolve the problem manually by iterating through the axes: Adapt the implementation for CoordinateSystem::setTicLength() to your problem (axes is a public vector, so you have access to single axes in order to address them individually). void CoordinateSystem::setTicLength(double major, double minor) { for (unsigned i=0; i!=axes.size(); ++i) axes[i].setTicLength(major, minor); } There is also an enum AXES, supporting you in identifying the correct axes - check the axes example to see an example. HIH, Micha -- --__--__-- _______________________________________________ qwtplot3d-interest mailing list qwt...@li... https://lists.sourceforge.net/lists/listinfo/qwtplot3d-interest End of qwtplot3d-interest Digest |