Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fee4289

Browse files
author
Steve Chaplin
committed
13/12/2004
svn path=/trunk/matplotlib/; revision=780
1 parent 64bd6d3 commit fee4289

2 files changed

Lines changed: 5 additions & 13 deletions

File tree

CHANGELOG

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
New entries should be added at the top
22

3+
2004-12-13 dates.py: removed all timezone() calls, except for UTC - SC
4+
35
2004-12-13 colors.py: rgb2hex(), hex2color() made simpler (and faster), also
46
rgb2hex() - added round() instead of integer truncation
57
hex2color() - changed 256.0 divisor to 255.0, so now

lib/matplotlib/dates.py

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/usr/bin/env python
12
"""
23
34
Matplotlib provides sophisticated date plotting capabilites, standing
@@ -90,15 +91,7 @@
9091
MONTHLY, WEEKLY, DAILY, HOURLY, MINUTELY, SECONDLY
9192
from dateutil.relativedelta import relativedelta
9293

93-
UTC = timezone('UTC')
94-
Eastern = timezone('US/Eastern')
95-
Central = timezone('US/Central')
96-
Mountain = timezone('US/Mountain')
97-
Pacific = timezone('US/Pacific')
98-
London = timezone('Europe/London')
99-
Paris = timezone('Europe/Paris')
100-
Berlin = timezone('Europe/Berlin')
101-
Moscow = timezone('Europe/Moscow')
94+
UTC = timezone('UTC')
10295

10396
def _get_rc_timezone():
10497
s = matplotlib.rcParams['timezone']
@@ -599,7 +592,7 @@ def mx2num(m):
599592
if __name__=='__main__':
600593

601594
#tz = None
602-
tz = Pacific
595+
tz = timezone('US/Pacific')
603596
#tz = UTC
604597

605598
dt = datetime.datetime(1011, 10, 9, 13, 44, 22, 101010, tzinfo=tz)
@@ -647,6 +640,3 @@ def mx2num(m):
647640
#for t in ticks: print formatter(t)
648641

649642
for t in dates: print formatter(t)
650-
651-
652-

0 commit comments

Comments
 (0)