question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PanZoom does not work with pandas datetime data - x-axis overzooms

See original GitHub issue

Trying to panzoom a linechart generated with the attached csv file. When using the zoom function, the x-axis (DateScale) goes completely off, making this feature unusable. For one click in the wheel, the scale changes by more than 5 hours. I was expecting changes in the order of minutes. Attached is a reference notebook implementation showing the problem. bqplot_panzoom_issue.zip You will need to change your file path to import the data, currently set to: file_path = '~/work/FCMC_10Hz_simple.csv'

This is the data file: FCMC_10Hz_simple.zip

The last cell is my current, inelegant, workaround, where I need to plot my data against numeric index instead of its true time stamp.

Could you look into this? I could not find what the problem is. I tried to set the min= during my DateScale declaration, but that did not help either.

Help is much appreciated.

Tks.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:17 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
joderscommented, Nov 11, 2019

I also tested the fix with the initial example given above (it works correctly now)

1reaction
acelerecommented, Mar 2, 2018

Follow-up. OK, so I went into Windows>Settings>Date&Time Under the “Time Zone” dropdown, I had “(UTC -05:00) Eastern Time (US & Canada)” Bingo, when I change it to " (UTC) Coordinated Universal Time", zooming works as posted above. @DougRzz , please try to reproduce this. Let me know…

Read more comments on GitHub >

github_iconTop Results From Across the Web

PanZoom does not work with pandas datetime data - x-axis ...
Trying to panzoom a linechart generated with the attached csv file. When using the zoom function, the x-axis (DateScale) goes completely off ...
Read more >
Why cannot I apply zoom axes range to dual axis, like I can ...
While I only pan the plot, everything is fine - the dual copy is synchronized to the original X axis; Once I zoom...
Read more >
How to handle time series data with ease - Pandas
Using pandas datetime properties# ; datetime are character strings and do not provide any datetime operations (e.g. extract the year, day of the...
Read more >
Work With Datetime Format in Python - Time Series Data
Python provides a datetime object for storing and working with dates. Learn how you can convert columns in a pandas dataframe containing ...
Read more >
Pandas & Matplotlib: personalize the date format in a bar chart
He wanted to change the format of the dates on the x-axis in a simple bar chart with data read from a csv...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found