I have an X-Y graph that holds several datasets and has a cursor, locked to
datapoints, that the user can drag around to get information on different
datapoints and different datasets. The user can opt to hide a dataset to
make the display clearer. In this case, if the datapoint the cursor is
pointing to disappears from the plot, the cursor goes to (0,0) and has to be
manually brought back by the menu option "Bring cursor to centre", which is
a builtin function of the X-Y plot.
I want to remove this manual step and automatically bring the cursor back to
the centre. This should have been trivial- I assumed the "Bring cursor to
centre" would be a method of the X-Y graph object. Not so. So I then read
the new X and Y axis ranges aft
er removing the data and I set the cursor X
and Y to the midpoint of these. This doesn't work unless a datapoint exists
at the centre of the plot. So first, I unlock the cursor and move it to the
centre- this is fine. If I manually change the cursor lock mode to "Lock to
point" it automatically jumps to the closest datapoint- good. However if I
do it programmatically, it jumps to (0,0). Not good.
This is obviously an irritating problem. I'm on 6.0- I've not had the time
to backup and install the latest update, though I've not heard of this in
the discussed fixes.
I don't particularly want to have to locate the closest visible datapoint to
the centre and programmatically move the cursor there- it's bound to be much
slower than the builtin function if only I can get at it!
Anyone done this?