Skip to content

Commit

Permalink
Add trivial "invert" of charts
Browse files Browse the repository at this point in the history
Everything becomes upside down, but perhaps better than nothing.
  • Loading branch information
highfestiva committed Feb 22, 2023
1 parent f31a447 commit cc5505e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions finplot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2506,6 +2506,10 @@ def _key_pressed(vb, ev):
for win in windows:
for ax in win.axs:
ax.crosshair.update()
elif ev.text() == 'i': # invert
for win in windows:
for ax in win.axs:
ax.setTransform(ax.transform().scale(1,-1).translate(0,-ax.height()))
elif ev.text() in ('\r', ' '): # enter, space
vb.set_draw_line_color(draw_done_color)
vb.draw_line = None
Expand Down

0 comments on commit cc5505e

Please # to comment.