Closed Protomolekule closed 7 months ago
set_y_scale()
is only for flipping between linear and log scales. set_y_range()
fixes the Y-range so you won't be able to move outside of them. Due to a bug in Qt, I have to scale the values down if they are big, but it's hard to tell if that's what's going on in your case. Could you post a minimal but complete example for me to reproduce the bug?
Ah, ok.Thanks, one question cleared. I'm trying to reduce code to reproduce the behavior. Could't get it today. I'll come back to that next week. I think I call it in the wrong way, because the standard example is working proper. Maybe I call the class in wrong way.
Was a memory problem. fixed by restricting other parts mem usage
I'm using the set_y_range to zoom into the Y scale
def fplt_set_pricerange(self, settings): if settings['auto'] == False: # use settings by program fplt.set_y_range(settings['min'], settings['max']) else: min = self.df_main[['Open', 'Close', 'High', 'Low']].min().min() # get min and max from df max = self.df_main[['Open', 'Close', 'High', 'Low']].max().max() fplt.set_y_range(min, max) fplt.refresh ()
but I get scale which I don't expect
I've expected similar to
Both have the same df. But as soon as I use the function
set_y_range
I get the unreadable numbers.How to use the fplt.set_y_range() and fplt.set_y_scale() to zoom programaticaly? thanks in advance