Repository navigation
Version 2.9
After pulling in the fukatani's fix in the previous release, some bugs in matplotlib became apparent. The default implementation of artist_picker() has 2 issues which need to be overcome.
The first issue is that when looking for matching annotations, it uses Display coordinates. Unfortunately, the transformation from Data coordinates to Display coordinates places EVERY annotation within the current display. If the display graphs one day of data, then annotations located on any other day, which happen to transform to display units near the mouse get picked. To fix this problem, we now use the Data coordinates for the annotation to test whether it is within the view limits of the current display.
The second issue is annotation eclipsing. If there are two or more annotations located near each other, the default selection area for one annotation can completely eclipse another annotation. This can make it impossible to select and drag one or more of the annotations. To fix this issue, we'll switch the selection area to a rectangle including just the text string. This allows the user to grab a specific annotation by clicking on its text. If the text for two annotations collide, then this dragging operation might drag the wrong one. But this will then expose the annotation you want to move. Drag the first one out of the way. Drag the target annotation to the desired location, and then drag the first one back to its desired position.
This release fixes the above issues, making the dragging of User Events and User Notes much easier.
In addition, code has been updated to save the new position of any dragged annotation to the database immediately. These changes used to only be saved when the application was cleanly terminated. If it crashed, or the user killed it with a Ctrl-C (for example), then those position updates would be lost. Now they are written at the end of the drag operation. This eliminates the loss of position updates.