03-21-2005 03:23 PM
03-21-2005 04:46 PM
03-22-2005 10:46 AM
05-04-2009 02:25 PM
You can build a radar-looking polar plot using an X/Y graph and a picture control. Create a square bitmap of a circular radar display (with range circles and such) using the Windows Paint program. Then place a Picture control (with no border) on your panel and copy the bitmap you created into it. Have Labwindows size the control to the image so you know your image isn't being scaled. Last, size an X/Y graph to exactly the same pixel size as your picture control, place it over the picture, and set the background color of the X/Y graph to transparent so your picture shows through from underneath. You can even use the 'Round Frame' Decoration off the 'Classic-Style Controls' to put a nice border around your radar display.
Mathematically you can calculate your X and Y points from your polar data to use all the standard graph functions. You can also programmatically mask off the corner areas of your graph by only plotting the data if the magnitude is less than the maximum magnitude of the graph. You just have to come up with a scale factor from pixels of picture size to X/Y axis range.
On a canvas control the 0/0 point is the upper left corner. To graph points, you have to calculate offsets to move this to the center of the canvas. Using the graph control makes this simpler.
Is it possible to create a custom control so I could reuse this easily in other applications?
08-08-2010 12:37 PM
Hi Brain chase
Are you succeeded in plotting a polar graph on Labwindows using canvas control? If yes please send.