-
-
Notifications
You must be signed in to change notification settings - Fork 69
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
Roadmap #18
Comments
Hi, thanks for the great work. I'm currently working on a data viz app and came accross plotly_resampler a couple of weeks ago. I'm trying to find a way to incorporate it in my already existing Dash app. Would there be a straightforward way to do that ? Thanks for your time. |
Hi @szkjn, Lovely to hear that! Valid question, actually there is a (straightforward) way! Additionally, a new release this week will also support non-scatter-like traces (e.g., bar-charts, histograms) in your figure 🔥. Hope this helps you further! Kind regards, |
Hey @jonasvdd, thanks for your quick answer ! I had a look at For e.g, if I want to dynamically plug the sampler to say - a dropdown that selects the y-axis between Also, if there's a better place to ask these questions, please point me in the right direction :) Regards. |
Hi, I think that I understand your problem. You have multiple callback functions, which want to output/update the figure-related components. I would suggest that you create a separate issue, where you describe / copy-paste the text above! |
@szkjn, we added a dash-example on how to use plotly-resampler within a dash app! 😃 |
Annotations in a sense of being able to mark some arbitrary x_start and x_end? Very useful but maybe out of scope with this package as that would require a database + some messy plotly code (for now). Happy to hack on that and this in the future....I think annotations should be essentially a start and a stop time and some text that is fed by an Enum the user defines for strict categories, and should be supported by many plotting libraries, as well as abstracted to not use any plotting libraries. Another interesting idea is integrating this with a tool like https://github.com/ibis-project/ibis, say where you have some dashboard fed by ibis code, and you wanted to implement downsampling against that backend. |
may I ask, does that mean bar-charts are not yet supported? this post was quite a while ago. I'm using plotly express to build my charts
|
Hi @cjstudioz, Plotly-Resampler (at the moment) only aggregates data for scatter-like traces. I believe earlier versions of plotly-resampler crashed when non-scatter-like traces were present in the figure - which the release @jonasvdd is talking about solved. P.S. If you have any proposal of how bar charts should be rendered (with aggregation functionality), you may always create a seperate issue or pull request 🙏 |
happy to create a new feature request / bug report but just wanted to check. Does plotly-resampler currently meant to support bar charts? so I know whether to raise a bug or feature req. also thanks for this great tool obviously |
We intended to focus initially on scatter traces (as we mainly work on very large time series datasets in our job). However, we are open to extending the functionality of plotly-resampler :) (although this is less of a priority for us) |
Hi @cjstudioz, feel free to do so! 😄 Could you then also provide a minimal (slow-)working example? Plotly-Resampler its |
Hi! I love your work; it's making my work so much easier! As for the road ahead, I really wish there was a way to avoid the gaps in line plots. Some sort of interpolation between the rendered points could maybe work. |
Hi, Do you mean: setting This would boil down to this: # create a x-index with a gap
x = np.concatenate((np.arange(0, 1_000_000), np.arange(2_000_000, 3_000_000)))
y = np.random.randn(2_000_000)
# Default figure -> uses the default aggregation method with interleave gaps set to True
fr_autogap = FigureResampler(default_downsampler=EfficientLTTB(interleave_gaps=True))
fr_autogap.add_trace({}, hf_x=x, hf_y=y)
fr_autogap.show()
# Interleave gaps set to False
fr_nogap = FigureResampler(default_downsampler=EfficientLTTB(interleave_gaps=False))
fr_nogap.add_trace({}, hf_x=x, hf_y=y)
fr_nogap.show() Maybe we can add this to the FAQ section of our docs? @jvdd @AdrianSkib |
That's perfect - thanks a bunch! |
I do not know it this is already possible, sorry if I missed it in the documentation. I have an existing figure and I want to replace the data of a particular trace. This would be useful in the following case: There is a figure with two subplots, in the top one the original signal is shown, while on the bottom one a denoised version of the original signal. The denoising can be adjusted by changing the value of a parameter, in a slider for example, the denoised signal should then be recalculated (so a new signal) and the trace data should be replaced with the new one. The only approach that comes to my mind right now is taking the previous figure as a State in a callback, deleting the previous trace and with the add_trace method add the updated one. Finally, return the new figure. Great work on the library btw 😁 EDIT: I realise that instead of deleting the trace and adding a new one the update_traces method can be used, but still remains the problem of returning a new figure. Also, would the updated trace respect the resampler optimization? (I will try and check) |
@Juasmis you can use the FigureWidget class instead of Figure and update the data series in it to redraw. The plotly_resamper wrapper works great with it. |
Hey @Juasmis That is a very cool use case you are describing!! 👀 If you are working in a notebook environment I would also suggest using the To support reloading when data is added / changed we added the P.S.: You can see an example of |
I am trying to implement this functionality in a Dash app and not sure what is the alternative to the Maybe I am polluting this thread with these questions, if it is the case, I am happy to move the conversation to a different place Thanks for the help! @alyashenko @jvdd |
Hi @Juasmis, I found it a fun challenge to create a dash app concerning your problem! Kind regards, |
Sort of an out there feature but lets say I did have an infinite stream of timeseries data that I wanted to plot and use the functionality of this library.
Lots of unknowns there but I think interesting Sort of related: |
This issue is a request to the community to submit what their vision of plotly-resampler is, which features are still worth implementing?
Some features which I find worth pursuing:
-> e.g. a Table with df.describe() for each series that is shown.
No idea how to implement this with plotly, would think that you would need to define your own OO structure to do so (which re-uses underlying annotations), but this would still imply a lot of logic and design decisions (e.g. loading annotations, saving annotations, ...)
just a gist, but using a plot-per-pixel ratio of 2 with LTTB seems a rather good IDEA to me.
Also, playing with the line-width seems a valid path to embark upon.
The text was updated successfully, but these errors were encountered: