11-12-2005 09:47 AM
11-12-2005 11:22 AM
11-13-2005 07:17 AM
11-14-2005 01:51 AM
Just a try...
What happens if you start without cursors, plot your data and then attach a cursor to the plot?
SetCtrlAttribute (panel, control, ATTR_NUM_CURSORS, 1);
SetGraphCursor (panel, control, 1, pDsplFrqArray[0], pDsplSpecData[0]);
11-14-2005 02:44 AM
Yes! I changed the code to attach cursor after plot the data as you told me. There is no error any more. But I am still bewildered by it. Any way, thank you very much! Roberto.
Further more, could you tell me how to check if the cursor and plot use the same coordinates ?
11-14-2005 03:00 AM
Well, as you know, the plot is plotted against ATTR_ACTIVE_XAXIS and ATTR_ACTIVE_YAXIS of the graph, which are by default the bottom and left one unless otherwise set in code. The cursor itself has two reference axes, which you can set either in the UIR editor (Graph properties, Cursor popup, Use right Y axis and Use Top X axis check boxes) or programmatically by using
GetCursorAttribute (panel, control, 1, ATTR_CURSOR_XAXIS, VAL_BOTTOM_XAXIS);
GetCursorAttribute (panel, control, 1, ATTR_CURSOR_YAXIS, VAL_LEFT_YAXIS);
Again, default is to use bottom and left axis.
11-14-2005 03:26 AM
Yes ! I am completely clear. I checked the setting of cursor in UIR and found that I set the cursor to use right y-axis. It must be the cause of the error.
Thank you !