-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
Plot functionality #73
Comments
About that I also played with it a little bit and implemented a version using It comes with a native mode and a wasm mode which can run in a browser. Pros:
We can create our own mark on charts and display stuff with the unit we wantBasically, egui let us write the mark we wants and spaces them however we want. Once I can decide to additionally display the month+year And by zooming even more I start to display the hours: With numbat in mind and #510 I can imagine a plot when the unit change while you zoom and that would be awesome. Cons:
Here's my branch where I only did the bare minimum: #516 |
Nice! I just played with it as well and looks great.
plotly can do this as well
That would be really neat! But also.... difficult to implement, I think. Because we would need to run Numbat code from within a FFI function.
👍
I agree In general, I really like egui. I did a project with it in the past. I haven't looked closely into the plotting functionality, but I would be a bit hesitant to choose it over more "mature" plotting libraries. Maybe we're going to support different "backends" in the end. One for interactive viewing, one for generating high-quality images, one for the web? Ideally, that would all be supported by the same library, but I doubt that'll work. Dependencies are also a concern. This is what I liked about the plotly option. It's rather lightweight since the heavy lifting is done by the JavaScript library that can be loaded in the browser, but doesn't need to be part of Numbat itself. I think egui_plot is a really good contender in this space. Let's continue to do some experiments. The biggest challenge right now for this feature is not the plotting backend, but rather the Numbat API that we'll use. Plotting "code" tends to have LOTS of configuration options. Even if we only support simple line and scatter plots, we're soon going to want to have more control over these plots (plot multiple functions, colors, line styles, axes options, linear vs logarithmic, …). And right now, I don't really have a good idea on how to design this in Numbat in its current stage. Maybe something like a huge
and then something like
Or maybe we would add the function itself to the options-struct as well. But then we would need something like rusts As I said, I don't really have a great idea so far. Maybe the language is not yet ready for this. |
It seems a bit early language-wise, but at the same time in terms of usage it could easily be a central part of numbat.
Yes I agree.
Either that or named optional parameter like they do in python.
Nice, I missed that, I was struggling to move the chart but maybe I was just being dumb and didn't try to scroll to zoom. Something else that would be nice with |
Ok. Let's choose a good subset of features that we want for a first version of this. Maybe:
|
Combined with #51, this could be really powerful.
The text was updated successfully, but these errors were encountered: