-
-
Notifications
You must be signed in to change notification settings - Fork 373
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
add base 2 and base e scale.distr options #304
Comments
There is no difference between log10 and log2 or log (I think you mean
This division by log_base_a(b) is a constant. Therefore, the graphs for any log graph will look exactly the same. |
heh, thanks for chiming in :) i guess the main effect this will have is how the min/max is padded/snapped and how axis splits (ticks) are chosen. in this case it should be sufficient to use an e.g. base2 |
can you post an easily runnable fiddle with your chart config that exhibits the above behavior? generally, increasing https://github.com/leeoniya/uPlot/blob/master/src/opts.js#L449 EDIT: nevermind, i see you're customizing axis.values :D. please put up a fiddle anyways, i'd like to play around with it. |
also, the different line color of the series in the 100ms+ range tells me it may need to be on its own, separate scale & additional y axis on the right. that will give you a lot more visual resolution in the sub 1ms series. |
oh, lol. that's quite the latency range, good sir!
e.g. https://jsfiddle.net/3p4o0s5z/ i've also opened #305 for a possible improvement |
Haha yes, yes it is. It's also an artificial example. 10ms -> 20s latency range is fairly normal though in my experience. |
Aha, I think I figured it out. If you provide a |
Uhh so exactly what you wrote in #305 actually, now that I am looking at it again. |
i've decoupled this now works as expected: https://jsfiddle.net/zhpqkdo1/ |
gave still some questions around whether to handle numbers < 1, like 2^-5. also, log2 is a middle ground between linear and log10, for which the split gen strategies are very different. log2 is a hybrid in that its splits are always evenly spaced (like linear) since they're always at power boundaries, while the scale and increment finding is similar to log10, where the splits can be variable if you choose to show and annotate the 1/10th magnitude lines. i think there needs to be a bit of rework to have log scales generate their evenly-spaced power-boundary splits, similar to linear but in log space instead of raw values - this can be done using near-identical strategy to linear. then afterwards the log10 variant needs to splice in the 1/10th magnitude splits. it'd be kind of like a majors -> minors pass. |
i've pushed a bunch of commits that add |
scale.distr
mapping:The text was updated successfully, but these errors were encountered: