Matlab Data cursor tip when hovering - matlab

Data cursor tips in matlab are immensely useful, but as far as I know you have to always click on the plot to apply them.
Is it possible to set it up so that they temporarily appear when you hover the mouse cursor over a data point, then dissappear when you move the mouse away? The reason I ask is that I often want to know the xyz of a point but don't want to add a data tip permanently

Related

Why does my game studder based on what I have selected in the hierarchy in unity

I have no idea why this happens and I was wondering if there was a reason or maybe even a fix.
Vid link to what I'm talking about: https://youtu.be/HwxqL95lzXU
The reason it occurs is that the editor has to update all changes made on whatever you have selected. On top of that, Unity will attempt to draw the gizmos related to the object you have selected and all child objects. Depending on the object you have selected, the number of updates that need to redraw the editor and/or the number of gizmos needed to be drawn can take up a lot of CPU, which causes lag.
The one solution I can think of is to click on Gizmos in the top right of the editor window, and uncheck the box Selection Outline. If there is not a noticeable enough difference, disabling all gizmos can also help.
Outside of these small changes, I am unsure if there is a way to heavily reduce CPU usage in editor when selecting objects in editor. I tend to never have objects selected while playing unless I need to track various data. Even if I do need to track data, it is not the entire gameObject, so I will selectively print data I need or track it with a custom editor tool.

Matlab GUI sliders: Change position directly to clicked point

Does any one know a way to change the behavior of Matlab sliders so that they move directly to the value you click on?
For instance, lets say a slider is initialized at zero (far left side). I'd like to able to click anywhere on the slider (including the far right side) and have the slider instantly move to that location. The way they normally work you'd have to click repeatedly to move the slider over to the right side one increment at a time, or hold down the right arrow.
I am running an experiment where subjects need to assign values for 420 sliders! It would speed things up a lot of each slider only required a single click.
Thanks,

Matlab: How can I use the a center mouse button click to record/log the data shown by a datacursor?

I am new to using Matlab and I have just made my first custom datacursor for a scatter graph I have plotted. This datacursor shows me the x position, y position and the location of that point within the original matrix (row). I want to be able to call the datacursormode and then have a callback within the datacursor, so that pressing the center mouse button on the point it will log the point data shown by the datatip/cursor into a matrix or array.
The idea is to be able to click on a point of interest,see the data tip info and then if the user wants they can click on the point with the middle mouse button to log the data tip information displayed, then move straight to the next point, without re-calling the datacursormode. This should then result in a cell array/matrix of all the point information selected.
I have tried disp(pos) but this displays every point clicked and I want to be able to click on the point and see the info before deciding whether to log it or not. I have tried ginput but calling it disables datacursormode. I think a callback within the custom datacursor function is needed, but I can never get them to work.
Please help.
Thanks for any help you can give.

Matlab: How to stop a spinning plot programmatically when the camera is in orbit mode

To see what I mean excatly please:
Run the code below
figure
plot(peaks)
cameratoolbar('SetMode','orbit');
cameratoolbar('Show');
Move mouse onto the plot. Hold down the left click, move the mouse to left ot right then release the click. You'll see the plot start sniping for ever.
Now if you click on the red, stop sign button it stops from spinning. However I would like to programmatically stop the spinning plot. Any thoughts?
Opening cameratoolbar in the editor reveals that orbiting is accomplished by setting the figure's WindowButton* callbacks temporarily to nested/sub functions within cameratoolbar.
Judging from the 1-minute diagonal read-through I did, the camera orbit itself is accomplished by calling a pan/zoom function orbitPangca, which recursively calls cameratoolbar. This recursion loop is controlled by flags which are toggled by the callbacks from the toolbar buttons. These flags alter the behaviour of each iteration in the recursion loop.
If this is indeed the case, it would imply that Matlab is not accepting commands from any source you have programmatic control over, while the plot is orbiting. It'll only respond to the button presses. This means that if you want to stop the motion programmatically, you'd have to hack cameratoolbar to allow for this - not the most portable option.
Another idea that just popped to mind, is figuring out which WindowButton* callback is used for the orbit, and define your own function there. You might just be lucky enough that the MathWorks implemented cameratoolbar such that both callbacks are called each iteration, which would give you programatic control over the flags. But -- you'd have to test this yourself.

Emacs: mouse wheel scroll preserve buffer position

How to enforce preserving buffer position while scrolling with mouse wheel?
Currently if I scroll for amount that buffer cursor position should be out of the screen that position is changed. And I don't want this because it is not happening in other editors like Qt Creator, IntelliJ IDEA etc.
I would like to have some mouse-wheel-scroll-preserve-buffer-position.
You can't. The Emacs display engine doesn't allow this. See this question
BTW, while the position of point has to be on screen, that doesn't prevent an Elisp package from reverting point to what it was before the mouse-wheel scroll when you stop scrolling and hit the keyboard again.
So, Emacs doesn't support it right now, but it shouldn't be difficult to make it work if you really want to. Patches welcome to add such an optional behavior.