-
-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If ax.disable_x_index() is set up then the chart is disappeared after update_gfx() #484
Comments
I attempted setting |
@highfestiva, for example, I changed line 35 in
Dots on subplot 2 have disappeared. |
@highfestiva , this is complete, minimal example. Please comment line 13 import pandas as pd
import numpy as np
import finplot as fplt
#
smile = None
def update_data():
global smile
smile=smile**1.04
plots["one"].update_data(smile, gfx=False)
plots["one"].update_gfx()
#
ax = fplt.create_plot('Smiles', rows=1, init_zoom_periods=300)
ax.disable_x_index()
plots={}
x=np.arange(-20, 20, 1, dtype=int)
y= x**2*1e-2
x=83000+x*500
smile = pd.DataFrame({'price': x, 'vol':y})
smile = smile.set_index('price')
plots['one']=fplt.plot(smile, width=3, ax=ax)
fplt.timer_callback(update_data, 2)
fplt.show() |
Ah, check if 2df5abd does the trick. |
Good. Charts are shown after update with |
It's caused by |
@highfestiva, please help me with the zoom problem I mentioned before. In the example above the one line was removed to prevent data modifications.
The problem is if zoom in is made by right mouse then on next update the zoom is reset automatically. How to make the zoom remain in a state I selected? |
Perhaps you're looking for |
|
This zoom comes from pyqtgraph, and is not removed by finplot. But also no particular support has been added to it. To disable auto-y-zooming, you could temporarily set |
pip install -U finplot
).Code to reproduce
Describe the bug
I borrowed chart update logic from the
complicated.py
example. The X axis is not a time series. Correct plot is shown first time iffirst_call_flag
is True. But after callingupdate_gfx()
the plot becomes empty.Also any realtime plot's updates produce the same result if
ax.disable_x_index()
is used.The
data
looks like this:price is a index and X axis values, vol is Y axis values
Expected behavior
To see updated data on the plot.
Reproducible in:
OS: Windows 2019 Server
finplot version: 1.9.3
pyqtgraph version: 0.13.3
pyqt version: 6.6.1
The text was updated successfully, but these errors were encountered: