Is scrolling an axis possible in ROOT?

Dear ROOTers,

I just found and (undocumented?) option, that I can zoom an axis with rolling mouse wheel over it. Is there a similar possibility to scroll a zoomed axis? An example would be a long signal over time curve, where initially we want to see the whole curve, but then zoom on interesting feature and scroll forward/backward without unzooming and rezooming. This would be reaaaaally handy in many cases.

I am not completely sure to understand the exact feature you are looking for.
Now you can:

  • select a range on an axis

  • zoom using the mouse wheel while pointing the axis

  • on a 2D plot zoom on the plot by defining a rectangular area or using the wheel

Similar to viewing/editing sound file. You can view the whole sound track graphically, but most of the software allows you to soom on chosen part, and then move through this track with the same zoom, with mouse or keyboard.

Let’s say you have a TGraph with X axis spanning from 0 to 1000. You zoom to 0-100, then the feature I am asking about would allow you to move to 1-101, 2-102… 900-1000 with mouse or keyboard (preferably with the step adjustible by shift or so).

Ah yes I see… The only thing to define the the way to interact … it seems all the possible ways are already doing something.

Hmm, I am not sure what do you mean by “the way to interact”. I guess it is not a keyboard/mouse issue? Because even random keys like a/d and w/s would be better then nothing.

Another way could be to add a scrollbar in the canvas, but then it is control separate from TAxis, so I guess complicated to code…

It is that… all the possible interaction with mouse only are already used. Some extra key will need to be involve I guess… ahem you some preferred “standard” way ? what would be key combination for the sound track you mentioned before ?

I just opened some random video editor - KDEnlive - and there it seems that zooming is ctrl+mouse wheel, while scrolling through the zoomed track is just mouse wheel.

And indeed, in many cases that I can recall, like some maps, ctrl+mouse wheel is the thing for zooming. But I understand that just the mouse wheel is now zooming in ROOT, so changing it to scrolling would be breaking compatibility in behaviour. If this is an issue, I guess ctrl+mouse wheel for scrolling is OK, as long as it is documented :slight_smile:

yes crtl+mouse can be “panning” … (I think that’s the right term)

Yes, probably you are right about the term. Sorry I wasn’t clearer from the beginning.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.