4 Sep 05:53
RE: QwtPlotSpectrogram and contour text labels .... try this update.
From: Hill, Shane <Shane.Hill <at> dsto.defence.gov.au>
Subject: RE: QwtPlotSpectrogram and contour text labels .... try this update.
Newsgroups: gmane.comp.graphics.qwt.general
Date: 2008-09-04 03:53:45 GMT
Subject: RE: QwtPlotSpectrogram and contour text labels .... try this update.
Newsgroups: gmane.comp.graphics.qwt.general
Date: 2008-09-04 03:53:45 GMT
G'day All, Two minor updates: * Fixed an issue with text rotation. Needed to take into account aspect ratio between real and display coordinates. * Added a label step variable to choose which contour lines would have labels. i.e. all, 2nd, 3rd, 4th, etc contour interval. Have Fun !! Shane Hill -----Original Message----- From: Hill, Shane Sent: Wednesday, 3 September 2008 5:16 PM To: 'List for both Qwt users and developers' Subject: QwtPlotSpectrogram and contour text labels .... try this. [SEC=UNCLASSIFIED] G'day All, (Second try for this. The first blocked by zip file. Now using a tar.gz file.) Uwe or Josef: Feel free to add any aspects of this code to the base QwtPlotSpectrogram if you think it is useful. A while back I asked the group about text labels for the QwtPlotSpectrogram and found, while this had not been done yet, it was something that was on the list of things to do. I have just spent a few days looking into this and have written and extender class to QwtPlotSpectrogram that will add contour text labels called LabelledSpectrogram. To test it out I have modified the QwtPlotSpectrogram example and added another contour plot over the top of the example (i.e. two contour diagrams in the one plot; something I need to do). The code is in early development, but I have attached it for anyone to have a look at, use or make comment on. Included in the code is a sample PNG file on what it should look like. Features of LabelledSpectrogram ------------------------------- * Contour labels may be positions based on label placement bit flags. Any combination of the flags may be enabled. The options are: * N_PER_LEVEL: Display 'N' labels per contour level evenly spaced (sort of); default is 2 per level. * AT_MIN_X: Display a label at the minimum X value for each contour. * AT_MAX_X: Display a label at the maximum X value for each contour. * AT_MIN_Y: Display a label at the minimum Y value for each contour. * AT_MAX_Y: Display a label at the maximum Y value for each contour; the default behaviour. * NO_LABELS: As it says. * Labels are rotated to follow the contour line. There are still a few small issues with this that I'm working on; namely that consecutive labels may sometimes flip by 180 degrees. * Label text is back filled to put a break in the contour line, so the label is easier to read. This does cause an issue with the solid filled coloured spectrogram, (maybe back filling should be turned off for this case). * Label font attributes may be changed. * A margin around the plot may be set to prevent labels from getting too close to the plot edge and become unreadable. Have Fun !! Shane Hill ----------------------------------------------------- Shane D. Hill (B.E. Aero. Hons.) Science Team Leader: Aircraft Flight Dynamics, Modelling & Simulation Aircraft Vehicles Division Defence Science & Technology Organisation 506 Lorimer St, Fishermens Bend, Vic. 3207 AUSTRALIA Email: Shane.Hill <at> dsto.defence.gov.au Voice: +61 3 9626 7811 FAX: +61 3 9626 7705 ----------------------------------------------------- IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email.
------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________ qwt-interest mailing list qwt-interest <at> lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qwt-interest
RSS Feed