New plottables - DraggableMarkerPlot and DraggableMarkerPlotInVector#1558
New plottables - DraggableMarkerPlot and DraggableMarkerPlotInVector#1558swharden merged 15 commits intoScottPlot:masterfrom
DraggableMarkerPlot and DraggableMarkerPlotInVector#1558Conversation
- `DraggableMarkerPlot` is a `MarkerPlot` that can be dragged through a `Plot`. This can serve as a *static* way to pinpoint a location on the axes. By *static* I mean that does not move with the mouse unless dragged - `DraggableMarkerPlotInVector` behaves somewhat similar to as `ScatterPlot` that in addition has a draggable point. When you drag the point, it goes to the coordinates in the vector closest to the mouse position.
|
Hi @BambOoxX, thank you for this interesting PR! I'll begin working on it after #1556 and #1557 I haven't read the code in detail yet but I'm curious - would it be possible to inherit EDIT: #1422 (comment) could use inheritance too |
Now the movable marker in `DraggableMarkerPlotInVector` isn't drawn though the selection cursor moves correctly. Color and dimensions of the cursor have been hardcoded temporarily. New properties would be nice, in order to set only the color / size of this specific marker.
|
@swharden I just tried to use some inheritance, but for |
|
Hi @BambOoxX, related to #1558 I got you started here by adding a cookbook example I was confused at first because the default marker color is white and I thought it was a rendering failure but it turns out it was just white on white, but all looks good now! I changed the marker type to Can you add a similar cookbook example to demonstrate DraggableMarkerPlotInVector? That use case is a little more complex but I'd like to see how you choose to showcase it. Thanks! 🚀 |
I will try and do an example, I have in mind something close to However, I can't understand why the marker is not plotted now in |
Inheritance implemented in f33ec6f, makes the marker impossible to draw.
…may be more relevant
|
Hi @BambOoxX, thanks for this PR! It looks like you figured everything out and this is ready to merge. These new plot types will be available in the next release 👍 😎 🚀 |

DraggableMarkerPlotis aMarkerPlotthat can be dragged through aPlot. This can serve as a static way to pinpoint a location on the axes. By static I mean that does not move with the mouse unless draggedDraggableMarkerPlotInVectorbehaves somewhat similar to asScatterPlotthat in addition has a draggable point. When you drag the point, it goes to the coordinates in the vector closest to the mouse position.