How to hide other items in a similar way as hiding a plotted line by clicking the legend at the corner? #499
-
I modified the programme and drew some arrows by using a method similar to how the program draws candles with ohlc. If you could provide an example on how to change the programme to hide the candle sticks like I hide lines, I would know what to do for my special case. Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Try this: candles = fplt.candlestick_ochl(..., ax=ax)
def key_pressed(vb, ev):
if ev.text() == '1':
ax.removeItem(candles)
if ev.text() == '2':
ax.addItem(candles)
old_key_pressed(vb, ev)
old_key_pressed, fplt._key_pressed = fplt._key_pressed, key_pressed |
Beta Was this translation helpful? Give feedback.
Try this: