uniplot icon indicating copy to clipboard operation
uniplot copied to clipboard

Configurable move / zoom keys

Open riga opened this issue 11 months ago • 4 comments

After using uniplot now for a couple days, I found myself using the interactive mode quite often for some simple EDA on remote resources. However, I've been struggling a bit with the h/j/k/l key combinations for moving the bounding box ("struggling" is perhaps a too strong word here ^^), so I've been wondering if you would be up for having this configurable. If this option existed, I would change it to w/a/s/d.

The Options dataclass could be a good place for that, however, the question is whether this should be configurable per plot/histogram() call (1), or a global setting (2).

I don't believe people would need to change this behavior from plot to plot, so option 2 could make more sense here. In this case, a ClassVar on Options would already do the trick, allowing for (e.g.)

import uniplot
uniplot.Options.move_keys = "wasd"
uniplot.plot(...)

(just as an example, a proper setter is of course preferable here to change the class var)

riga avatar Mar 05 '24 16:03 riga