Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Bug]: Performance Issue: Significant Time Difference when Plotting Time Series Data with and without Timezones #27717

Open
@HarryCollins2

Description

@HarryCollins2

Bug summary

Hello. When plotting time series data using Matplotlib and Pandas, I have observed a significant difference in execution times between plots with and without timezones.

Code and Observation:

I have provided a code snippet below for reference:

Code for reproduction

importmatplotlib.pyplotaspltn=1000000vertical= [iforiinrange(n)]# Prepare the datadates_no_tz=pd.date_range('2019-01-01',periods=n,freq='T')dates_with_tz=pd.date_range('2019-01-01',periods=n,freq='T',tz='UTC')# Plot the time series without timezone%timeplt.plot(dates_no_tz,vertical)# Plot the time series with timezone%timeplt.plot(dates_with_tz,vertical)

Actual outcome

CPU times: user 50.6 ms, sys: 19.1 ms, total: 69.7 ms
Wall time: 71.2 ms
CPU times: user 3.44 s, sys: 192 ms, total: 3.63 s
Wall time: 3.69 s

Expected outcome

Expect a similar execution time

Additional information

No response

Operating system

No response

Matplotlib Version

3.8.0

Matplotlib Backend

module://matplotlib_inline.backend_inline

Python version

Python 3.9.18

Jupyter version

No response

Installation

pip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp