-
Notifications
You must be signed in to change notification settings - Fork 616
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
WIP: Preview date_axis #2402
base: main
Are you sure you want to change the base?
WIP: Preview date_axis #2402
Conversation
Thanks for putting together. This entire general idea is something that VisPy could really benefit from. It isn't clear to what exact functionality you are worried about being "good enough". Converting some X values to formatted dates in the tick labels is absolutely, from a high level point of view, something we want. Having the tick labels auto-update positions and values as you zoom in is less necessary but also very cool. Some things that come to mind as I read your code:
Bottom line is that at this point it is hard to tell if your approach is a good one or a bad one because I'm having trouble following the code. The general feature though 👍 and thank you for putting in the work to try to get this figured out. |
Thank you for your feedback. At the beginning I just wanted to map some string to the integers of the axis. for example group A, group B, control group or just a list of dates. Now I just need a start date and the delta between date@int(1) and date@int(2) and it interpolates between integers and goes on forever.
|
I like the idea of this being flexible enough for people to name their histogram bins and stuff. It'd be great if this is flexible for that to happen easily in the future.
|
Yes that would be the plan. Regarding those Locators https://matplotlib.org/stable/gallery/ticks/date_demo_convert.html I feel like they are bit manual shouldnt the scaling be automatic? |
It is difficult to compare because I think most of matplotlib's examples are going to assume a static plot where vispy will typically assume an animate/dynamic plot. That said, users will probably know their data and choose what they want most. If there data is hourly there is no need to automatically choose per-minute ticks. Of course, on the other side of that argument is that if you zoom in enough you won't see any ticks, right? What does matplotlib do if you don't specify a locator at all? |
Since i use vispy I dont use mpl at all, all I remember is that if I gave it a data with datetime it just plotted it without providing a locatior, but I dont know what happened if you zoom in. |
Hey, I'm looking for some feedback.
Does the code need polish - yes, a lot
Pandas shouldn't be used - yes
Are there some bugs - yes
I'm more interested if the functionality is considered to be good enough to be included in vispy if the issues are ironed out.
python_2022-10-08_14-44-12-63.mp4
The axis keeps scaling down until 1 mircosecond, other vispy componemts break down at that zoom first