Offset graph using the mouse

Hello,

By clicking on the graph using the right mouse button i'm supposed to be able to offset my graph.

I'm having a problem where it works only one out of fivty times where if i click a drop down menu will appear.

I'm a mac user with mountain lion and I'm using the latest version of Igor (6.2).
i deleted the program and re downloaded it but no change

Is there any way to get around that problem? Anyone having the same problem?
Quote:
By clicking on the graph using the right mouse button i'm supposed to be able to offset my graph.


I'm not sure what you mean by "offset my graph" but right-clicking is supposed to display a contextual menu.

For a list of graph shortcuts, execute:
DisplayHelpTopic "Graph Shortcuts"
Quote:
What i want to do is offsetting a trace like in this video

This requires that you click (left-click) hold for a second and then drag.

We have had reports of it not working on Windows and this has sometimes been fixed by updating the mouse driver.

I am not aware of reports of it not working on Macintosh. If you are using a non-standard (i.e., non-Apple) mouse driver, that may be the problem. Otherwise I don't have any idea of what might cause this problem.

You can also offset a trace by double-clicking it and using the Offset checkbox in the Modify Trace Appearance dialog.

I fnid it fairly annoying that I can accidentally offset a trace with this shortcut.  Even worse, I often offset a trace all the way off the graph so that it disappears when I drag the mouse.

Actually, I had to search the forum to figure out what I was even doing wrong -- it was triggering by accident when I work on my laptop with trackpad.

Is there any way to turn it off? Or could it at least print the result to history, so I know that this is what happened?  

I see the help suggests hitting CAPS lock beforehand, but if I am doing it by mistake, that won't work!

The accidental offset problem has been with us for a long time. Some years ago we increased the time delay before offsetting starts to help avoid the problem. And the existence of the caps lock kludge indicates that your difficulty with this is far from unique.

I will file an enhancement ticket to add a Misc setting to control this action. We will have to ponder deeply to make sure it doesn't do something unexpected and bad :) We tend to discourage preference settings like this- people tend to set them and forget them, and then ask us why they can't do something that they told Igor not to do years ago.

Thanks for your comments. 

It could be changed to double click and hold. Or require CTRL. Or something.

I would bet pretty heavily that almost nobody uses this feature *and* that the kind of person who uses it is the kind who will figure it out for themselves what the change was.

We will be thinking about it. Though I can't prove it, I suspect from tech support queries that your last statement is inaccurate.

Just for the record, I and most of my colleagues use this feature all the time. It would be a nightmare to align (or quickly offset) spectra without this. By the way, if the Modify Trance Appearance dialog would show the result live (just like the Modify Axis dialog), then this would somewhat reduce the need for this feature a bit in my case. I could then fiddle with the offset values while instantly seeing what is going on.

In reply to by chozo

I too use use trace dragging all the time. Usually I hold the shift key to constrain the offset to the vertical direction. This is one of a group of features that sets Igor above other software for working with spectroscopic data.

@chozo i have some code that I use for quickly setting offsets for many traces on a plot. let me know if you want to take a look.

 

Thanks Tony! In fact, for this very reason I have written a small panel which can offset traces either relative to each other or all together. :) I want to release this as a project together with the graph sizing panel (the code snippet) as a toolset for graphs. But this is still far from presentable to the world. If you have something to quickly move around a specific trace (similar to dragging) then I would be very much interested.

What I have is some functions that stack traces with vertical offsets to fill the vertical space in a graph window. I wrote this not so much for producing polished output for publication, more for making plots of raw spectra efficiently. I've never documented this properly because I don't usually share this. The thing that this does differently to other tools is to calculate offsets relative to existing offsets. So I can align traces by offsetting each trace, then add an extra set of offsets to spread the traces in a uniform way. I doubt it does what you're looking for, but maybe useful for something.

 

StackTraces120.zip

Nice, thank you Tony. I will play around with that. I'll attach the current state of my panel and graph related functions. The Graph size panel is included as well (from here: https://www.wavemetrics.com/code-snippet/small-panel-set-graphs-size-ma… ). It is not polished for public use, and especially might look too cramped for Mac, but should be useable. If you have any suggestions or comments I would really like to hear them.

Looks great.

If you want to incorporate some ideas from StackTraces, you could add 'shift offset per trace" and "align traces at cursor position".

Perhaps also "sort traces at cursor position" to sort by (possibly offset) y value at that position.

But already it looks very useful. Thanks for sharing!

Thank you for your comment. I will definitely have a close look at your StackTraces code. I will ask again if I want to incorporate something in my toolset. I will brush up the code in the next few weeks.

Just my two cents- the Wave Arithmetic panel will apply offsets to align the A and B graph cursors. The idea was to put the cursors on a feature like a peak on two traces that should be aligned, and then change whatever is needed to align them. It works on both waveforms and XY traces. See Analysis->Packages->Wave Arithmetic. There is a demo experiment as well, File->Example Experiments->Analysis->Wave Arithmetic Panel Demo.

It is not built to handle large batches of waves, though, so it perhaps doesn't completely answer your need.

In reply to by jcor

jcor wrote:

Thanks for your comments. 

It could be changed to double click and hold. Or require CTRL. Or something.

I would bet pretty heavily that almost nobody uses this feature *and* that the kind of person who uses it is the kind who will figure it out for themselves what the change was.

I'm getting some pushback here as far as adding a preference. We used to regularly get complaints about accidentally dragging until we increased the delay. We haven't gotten any recently. You mentioned originally that you use a trackpad on your laptop. Do you encounter this problem when you try to drag out a marquee? or move graph cursors?

In reply to by johnweeks

johnweeks wrote:

 

jcor wrote:

 

Thanks for your comments. 

It could be changed to double click and hold. Or require CTRL. Or something.

I would bet pretty heavily that almost nobody uses this feature *and* that the kind of person who uses it is the kind who will figure it out for themselves what the change was.

 

 

I'm getting some pushback here as far as adding a preference. We used to regularly get complaints about accidentally dragging until we increased the delay. We haven't gotten any recently. You mentioned originally that you use a trackpad on your laptop. Do you encounter this problem when you try to drag out a marquee? or move graph cursors?

First of all I need to acknowledge that I lost my bet!

Second, no, I do not experience that (i.e., my trackpad doesn't seem to click by accident any other time). I do also experience this with the mouse. I guess I am just a messy clicker.

The ideal solution would be that the Undo button would work for this event (i.e., embed a ModifyGraph TraceOffset command with the itnitial position). That would make me very happy, and probably not upset anyone else.

Thanks for the follow up John.

Hm. At least in 8.04, Edit->Undo works to undo the offset.

First of all I need to acknowledge that I lost my bet!

That's very gracious of you, especially after the readers here kind of piled on :)