Closed mathisloevenich closed 3 years ago
Thank you for the point, @mathisloevenich ! I will definitely look into this.
Hi @mathisloevenich ,
I am looking into this issue right now. And I am not entirely sure, what you are asking:
the y-values should look like [0, 10, 21.5 , 21, 42, 50]
Do you want to modify the displayed Y-values or just the tiks on the Y-axis?
fig.plot
funktion.It is possible to modify the Y-axis values via a callback. Please have a look at the example.
Hey @tammoippen thanks for having a look, I had no time to reply yet. Actually it has been quite a while but I remember now my point. I will have a look wether your example is working in my case, as I am not sure how it will play out. And to come back to your question, I want to modify the y-values because as I mentioned it was not obvious to know the exact values at where the usage stagnates.
Hey @tammoippen, thanks your callback function mean_y_value
does the jobs.
Your update is much appreciated :)
I have the Issue, that the y-values spread unevenly, so that I have no clue what the actual values are. Here is the output
In my case I have values in Megabytes and I want to spread them over datetime objects, which works perfectly fine, but as you see, it looks like the usage in MB stagnates at 908, which is not true, because it stagnates at 945 MB.
It would be nice to have an option which makes the y-ticks around those values in a certain range. My attempt would be to check which values appear more often and then to adjust a y-value at that point which should be something like the average of all points 5-10% of the total range .
for example [0, 10, 20, 20, 21, 25, 30, 32, 40, 44, 50]
the range is 50-0 = 50 10% of 50 is 5
for 0 and 10 nothing needs to be changed (20+20+21+25)/4 = 21.5 , now remove those four values (30+32)/2 = 31, same here (40+44)/2 = 42, same here 50 stays like it is
the y-values should look like [0, 10, 21.5 , 21, 42, 50]
I think an option for this would smoothen a lot of plots