Closed Vankeee closed 2 years ago
Take a look at examples/bfx.py
, which uses text above or below each candle. It also automatically reduces the level of detail when you zoom out.
@highfestiva Love you so much, you saved me. Here is another question, how to remove them all at once?
I found this funciton clear_items(drop_keys) in ScatterLabelItem class. I am confused about the "drop_keys", what is drop_keys? How can I get the drop_keys?
You want to remove that whole "plot" at once. For that you use ax.removeItem(labels)
.
Could I use clear_items(drop_keys)? The drop_keys is like {ts1:v1,ts2:v2,ts3:v3...}, right?
I dont know how to use ax.removeItem(labels) in your case, it seems like does not work for me cause I did it in a wrong way.
After line 55 in examples/bfx.py, you can add:
ax.removeItem(plots[2])
ax.removeItem(plots[3])
This removes the label plots from the chart. GL!
It seems does not work. Fine, I give up, I'll try it later. Thanks any way
I have 1 month data to plot. I already drew the candlestick chart. Now I wanna add text above all candlesticks. Here ia a question, the data length is about 40000, if I add text above all bars, that would be so slow and stucked in the UI rendering. Could I use ax.plot instead of fplt.add_text? How to realise it?
figure 1:
code: