-
Notifications
You must be signed in to change notification settings - Fork 950
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
Scaled sliders - convergence with bqplot and altair #1153
Comments
cc @ellisonbg @jasongrout @maartenbreddels @jakevdp This is still being edited. |
cc @ssunkara1 @dmadeka @rmenegaux @ccherukuri? People that might be affected - i.e. the core bqplot team? |
👍 good timing, I'm at the stage where I am about to add ticks to ipyvolume, and I will use d3 for that, so I'll be ready to adapt to using future scales. This would make linking bqplot axes, ipyvolume axes, and sliders possible, I like the proposal. Even starting out with just linear scales will help, that's I guess 80% of the use cases. |
For the record: this is not what I proposed. I simply proposed that |
See #721 for that discussion. |
Thanks for getting this started... The lack of solid scale implementations in Python is a huge issue that keeps showing up all over the place:
The thing that I think would be most useful:
Using widgets alone for this won't work as there are multiple Python libraries (Pandas, Matplotlib) that need Python scales and don't ever know about JS. Doing this would mostly involve porting the ds scales to Python... Cheers, Brian |
Right, but I never proposed to use the Would this proposal affect |
OK, since you taught me about type ABCs, I mixed the two issues (collections and numbers). I edited the description. There was no intention of misrepresenting what you have said. So regarding the selection slider, this could be based on a d3 ordinal scale. |
For a pure backend implmentation of scales, we will probably need a formal spec, otherwise, we will end up having inconsistencies between the different implementations. |
This is related to #1134. |
I've made a very humble beginning for this in https://github.com/vidartf/ipyscales. Any and all input is welcome 👍 |
The convergence of
altair
,bqplot
andJupyter interactive widgets
A quick unordered list of issues that seem unrelated at first but will all come together nicely with this proposal
@jdemeyer, in his work on Sage integration, fixed some semantics on our use of
isinstance
. He suggested that instead of having separateIntSlider
andFloatSlider
, we merge in a single numeric slider.The implementation of Jupyter widgets for manipulating integers and floats are essentially the same since everything maps to the same front-end implementation, especially since we rely on
d3.format
mini-language for the readout format. The difference between the integral and continuous variants is merely the default value for the display format.Note: in another unrelated discussion, (selection widgets), he taught me to type ABCs) I think that we could try to use a hierarchy of trait types mapping the types ABCs such as [PEP 3141] https://www.python.org/dev/peps/pep-3141/), the type hierarchy for numbers.
There has been discussions on how we could move away from the current implementation of the Jupyter-widgets slider.
bqplot
users have created helper functions that result in flat figures with brush or index selectors, that they use to select single values or intervals on date scales, logscales, with graduation.How current bqplot sccales wrap d3 scales in a meaningful fashion:
A d3 scale is typically a mapping between a domain (the data) and a range (the visual quantity that it is being mapped to).
A bqplot scale is a jupyter widget that does not have a visual representation.
- The model holds the domain information and has no information about the range.
- The view is typically instanciated as a child view of another widget (e.g. a figure). So it know the actual dimension of the parent view, and can deduce the range.
- The view is the object holding the d3 scale, since it has all the information about domain and range.
Proposal
d3
, since the project went through a split in multiple standalone projects. In fact, we already used3.format
for the readout.The text was updated successfully, but these errors were encountered: