Skip to content

line gaps if time series interval is irregular #299

Answered by jonasvdd
miloaissatu asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @miloaissatu,

Yes there is!
You can use the NoGapHandler (docs), which can be passed to the default_gap_handler property of AbstractFigureAggregator its constructor (docs).

import numpy as np; import pandas as pd

from plotly_resampler import register_plotly_resampler
# NOTE: I added this import to the original example
from plotly_resampler.aggregation import NoGapHandler


# And added the `default_gap_handler` argument to the `register_plotly_resampler` call
register_plotly_resampler(mode='widget', default_gap_handler=NoGapHandler())
pd.options.plotting.backend = 'plotly'


x = pd.DataFrame(np.random.normal(0, 0.01, 4000))
x.index = pd.Timestamp('2023-01-01') + (pd.Timedelta('1s') * np.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@miloaissatu
Comment options

Answer selected by miloaissatu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants