Skip to content

Commit 07023cc

Browse files
committed
Merged revisions 8870,8876,8879,8882,8884,8886,8889,8891-8893,8895,8897,8899 via svnmerge from
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v1_0_maint ........ r8870 | jdh2358 | 2011-01-02 11:53:33 -0600 (Sun, 02 Jan 2011) | 1 line bumped version number to 1.0.1rc ........ r8876 | jdh2358 | 2011-01-03 14:34:57 -0600 (Mon, 03 Jan 2011) | 1 line update pytz to 2010o ........ r8879 | efiring | 2011-01-03 18:45:25 -0600 (Mon, 03 Jan 2011) | 2 lines apply patch by Paul Ivanov to move twinx second axis offset to the RHS ........ r8882 | efiring | 2011-01-04 14:24:12 -0600 (Tue, 04 Jan 2011) | 2 lines Bugfix: invert_xaxis and invert_yaxis now notify observers. Closes 3123226 ........ r8884 | efiring | 2011-01-04 14:52:42 -0600 (Tue, 04 Jan 2011) | 3 lines Finance: change volume to float; close 3108059 ........ r8886 | mdehoon | 2011-01-05 07:31:24 -0600 (Wed, 05 Jan 2011) | 2 lines Replace MacOS.WMAvailable, as the MacOS module is not available with 64-bit Pythons, and deprecated for Python 3. ........ r8889 | jdh2358 | 2011-01-05 09:59:33 -0600 (Wed, 05 Jan 2011) | 1 line fix rc file defaults issue for docs; python 2.4 compliance for formlayout ........ r8891 | weathergod | 2011-01-05 11:44:17 -0600 (Wed, 05 Jan 2011) | 3 lines Applying a similar fix to r8873 which seemed to only have been applied to the development branch. This fixes a math domain error when using log scales. ........ r8892 | jdh2358 | 2011-01-05 12:14:36 -0600 (Wed, 05 Jan 2011) | 1 line remove unused params from doc rc; add comment on examples.download params ........ r8893 | jdh2358 | 2011-01-05 16:04:47 -0600 (Wed, 05 Jan 2011) | 1 line bumpt the rc version num ........ r8895 | jdh2358 | 2011-01-05 19:26:23 -0600 (Wed, 05 Jan 2011) | 1 line fix the plot directive ........ r8897 | jdh2358 | 2011-01-06 07:50:07 -0600 (Thu, 06 Jan 2011) | 1 line tag 1.0.1 for release ........ r8899 | jdh2358 | 2011-01-06 13:42:08 -0600 (Thu, 06 Jan 2011) | 1 line support relative paths in examples.directory ........ svn path=/trunk/matplotlib/; revision=8900
1 parent 7471077 commit 07023cc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+117
-337
lines changed

CHANGELOG

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
1+
2011-01-04 Tag 1.0.1 for release at r8896
2+
13
2011-01-03 Added display of ticker offset to 3d plots. - BVR
24

35
2011-01-03 Turn off tick labeling on interior subplots for
46
pyplots.subplots when sharex/sharey is True. - JDH
57

68
2010-12-29 Implment axes_divider.HBox and VBox. -JJL
79

10+
811
2010-11-22 Fixed error with Hammer projection. - BVR
912

1013
2010-11-12 Fixed the placement and angle of axis labels in 3D plots. - BVR
1114

1215
2010-11-07 New rc parameters examples.download and examples.directory
13-
allow bypassing the download mechanism in get_sample_data.
16+
allow bypassing the download mechanism in get_sample_data.
1417
- JKS
1518

1619
2010-10-04 Fix JPEG saving bug: only accept the kwargs documented

doc/api/gridspec_api.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
*************
1+
*******************
22
matplotlib gridspec
3-
*************
3+
*******************
44

55

66
:mod:`matplotlib.gridspec`

doc/matplotlibrc

Lines changed: 9 additions & 312 deletions
Large diffs are not rendered by default.

doc/pyplots/tex_demo.png

-5.86 KB
Loading

lib/matplotlib/__init__.py

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
"""
100100
from __future__ import generators
101101

102-
__version__ = '1.0.0'
102+
__version__ = '1.1.0svn'
103103
__revision__ = '$Revision$'
104104
__date__ = '$Date$'
105105

@@ -765,12 +765,30 @@ def rc_params(fail_on_error=False):
765765
# this is the instance used by the matplotlib classes
766766
rcParams = rc_params()
767767

768+
if rcParams['examples.directory']:
769+
# paths that are intended to be relative to matplotlib_fname()
770+
# are allowed for the examples.directory parameter.
771+
# However, we will need to fully qualify the path because
772+
# Sphinx requires absolute paths.
773+
if not os.path.isabs(rcParams['examples.directory']):
774+
_basedir, _fname = os.path.split(matplotlib_fname())
775+
# Sometimes matplotlib_fname() can return relative paths,
776+
# Also, using realpath() guarentees that Sphinx will use
777+
# the same path that matplotlib sees (in case of weird symlinks).
778+
_basedir = os.path.realpath(_basedir)
779+
_fullpath = os.path.join(_basedir, rcParams['examples.directory'])
780+
rcParams['examples.directory'] = _fullpath
781+
782+
rcParamsOrig = rcParams.copy()
783+
768784
rcParamsDefault = RcParams([ (key, default) for key, (default, converter) in \
769785
defaultParams.iteritems() ])
770786

771787
rcParams['ps.usedistiller'] = checkdep_ps_distiller(rcParams['ps.usedistiller'])
772788
rcParams['text.usetex'] = checkdep_usetex(rcParams['text.usetex'])
773789

790+
791+
774792
def rc(group, **kwargs):
775793
"""
776794
Set the current rc params. Group is the grouping for the rc, eg.
@@ -845,11 +863,19 @@ def rc(group, **kwargs):
845863

846864
def rcdefaults():
847865
"""
848-
Restore the default rc params - the ones that were created at
849-
matplotlib load time.
866+
Restore the default rc params - these are not the params loaded by
867+
the rc file, but mpl's internal params. See rc_file_defaults for
868+
reloading the default params from the rc file
850869
"""
851870
rcParams.update(rcParamsDefault)
852871

872+
def rc_file_defaults():
873+
"""
874+
Restore the default rc params from the original matplotlib rc that
875+
was loaded
876+
"""
877+
rcParams.update(rcParamsOrig)
878+
853879
_use_error_msg = """ This call to matplotlib.use() has no effect
854880
because the the backend has already been chosen;
855881
matplotlib.use() must be called *before* pylab, matplotlib.pyplot,

lib/matplotlib/axes.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2271,7 +2271,7 @@ def set_axis_bgcolor(self, color):
22712271
def invert_xaxis(self):
22722272
"Invert the x-axis."
22732273
left, right = self.get_xlim()
2274-
self.viewLim.intervalx = (right, left)
2274+
self.set_xlim(right, left)
22752275

22762276
def xaxis_inverted(self):
22772277
'Returns True if the x-axis is inverted.'
@@ -2479,7 +2479,7 @@ def set_xticklabels(self, labels, fontdict=None, minor=False, **kwargs):
24792479
def invert_yaxis(self):
24802480
"Invert the y-axis."
24812481
bottom, top = self.get_ylim()
2482-
self.viewLim.intervaly = (top, bottom)
2482+
self.set_ylim(top, bottom)
24832483

24842484
def yaxis_inverted(self):
24852485
'Returns True if the y-axis is inverted.'
@@ -7391,6 +7391,7 @@ def twinx(self):
73917391
frameon=False)
73927392
ax2.yaxis.tick_right()
73937393
ax2.yaxis.set_label_position('right')
7394+
ax2.yaxis.set_offset_position('right')
73947395
self.yaxis.tick_left()
73957396
ax2.xaxis.set_visible(False)
73967397
return ax2

lib/matplotlib/backends/qt4_editor/formlayout.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,11 @@ def setup(self):
272272
field.setCurrentIndex(selindex)
273273
elif isinstance(value, bool):
274274
field = QCheckBox(self)
275-
field.setCheckState(Qt.Checked if value else Qt.Unchecked)
275+
if value:
276+
field.setCheckState(Qt.Checked)
277+
else:
278+
field.setCheckedState(Qt.Unchecked)
279+
276280
elif isinstance(value, float):
277281
field = QLineEdit(repr(value), self)
278282
elif isinstance(value, int):

lib/matplotlib/finance.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
('close', np.float),
3939
('high', np.float),
4040
('low', np.float),
41-
('volume', np.int),
41+
('volume', np.float),
4242
('aclose', np.float)])
4343

4444

@@ -57,7 +57,7 @@ def parse_yahoo_historical(fh, adjusted=True, asobject=False):
5757
by the adjusted close, regardless of whether you choose adjusted
5858
= True|False.
5959
60-
60+
6161
*asobject*
6262
If False (default for compatibility with earlier versions)
6363
return a list of tuples containing
@@ -101,7 +101,7 @@ def parse_yahoo_historical(fh, adjusted=True, asobject=False):
101101
dt = datetime.date(*[int(val) for val in datestr.split('-')])
102102
dnum = date2num(dt)
103103
open, high, low, close = [float(val) for val in vals[1:5]]
104-
volume = int(vals[5])
104+
volume = float(vals[5])
105105
aclose = float(vals[6])
106106

107107
results.append((dt, dt.year, dt.month, dt.day,

lib/matplotlib/sphinxext/plot_directive.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -263,12 +263,10 @@ def run_savefig(plot_path, basename, tmpdir, destdir, formats):
263263

264264
return len(fig_managers)
265265

266+
266267
def clear_state():
267268
plt.close('all')
268-
matplotlib.rcdefaults()
269-
# Set a default figure size that doesn't overflow typical browser
270-
# windows. The script is free to override it if necessary.
271-
matplotlib.rcParams['figure.figsize'] = (5.5, 4.5)
269+
matplotlib.rc_file_defaults()
272270

273271
def render_figures(plot_path, function_name, plot_code, tmpdir, destdir,
274272
formats, context=False):

lib/pytz/__init__.py

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
'''
1010

1111
# The Olson database is updated several times a year.
12-
OLSON_VERSION = '2010h'
12+
OLSON_VERSION = '2010o'
1313
VERSION = OLSON_VERSION
1414
# Version format for a patch release - only one so far.
1515
#VERSION = OLSON_VERSION + '.2'
@@ -358,7 +358,7 @@ def __reduce__(self):
358358
return FixedOffset, (self._minutes, )
359359

360360
def dst(self, dt):
361-
return None
361+
return ZERO
362362

363363
def tzname(self, dt):
364364
return None
@@ -387,12 +387,16 @@ def FixedOffset(offset, _tzinfos = {}):
387387
pytz.FixedOffset(-330)
388388
>>> one.utcoffset(datetime.datetime.now())
389389
datetime.timedelta(-1, 66600)
390+
>>> one.dst(datetime.datetime.now())
391+
datetime.timedelta(0)
390392
391393
>>> two = FixedOffset(1380)
392394
>>> two
393395
pytz.FixedOffset(1380)
394396
>>> two.utcoffset(datetime.datetime.now())
395397
datetime.timedelta(0, 82800)
398+
>>> two.dst(datetime.datetime.now())
399+
datetime.timedelta(0)
396400
397401
The datetime.timedelta must be between the range of -1 and 1 day,
398402
non-inclusive.
@@ -530,6 +534,7 @@ def _test():
530534
'America/Atikokan',
531535
'America/Atka',
532536
'America/Bahia',
537+
'America/Bahia_Banderas',
533538
'America/Barbados',
534539
'America/Belem',
535540
'America/Belize',
@@ -956,6 +961,7 @@ def _test():
956961
'Pacific/Apia',
957962
'Pacific/Auckland',
958963
'Pacific/Chatham',
964+
'Pacific/Chuuk',
959965
'Pacific/Easter',
960966
'Pacific/Efate',
961967
'Pacific/Enderbury',
@@ -981,6 +987,7 @@ def _test():
981987
'Pacific/Pago_Pago',
982988
'Pacific/Palau',
983989
'Pacific/Pitcairn',
990+
'Pacific/Pohnpei',
984991
'Pacific/Ponape',
985992
'Pacific/Port_Moresby',
986993
'Pacific/Rarotonga',
@@ -1095,6 +1102,7 @@ def _test():
10951102
'America/Asuncion',
10961103
'America/Atikokan',
10971104
'America/Bahia',
1105+
'America/Bahia_Banderas',
10981106
'America/Barbados',
10991107
'America/Belem',
11001108
'America/Belize',
@@ -1155,6 +1163,7 @@ def _test():
11551163
'America/Maceio',
11561164
'America/Managua',
11571165
'America/Manaus',
1166+
'America/Marigot',
11581167
'America/Martinique',
11591168
'America/Matamoros',
11601169
'America/Mazatlan',
@@ -1195,6 +1204,8 @@ def _test():
11951204
'America/Santo_Domingo',
11961205
'America/Sao_Paulo',
11971206
'America/Scoresbysund',
1207+
'America/Shiprock',
1208+
'America/St_Barthelemy',
11981209
'America/St_Johns',
11991210
'America/St_Kitts',
12001211
'America/St_Lucia',
@@ -1220,8 +1231,10 @@ def _test():
12201231
'Antarctica/McMurdo',
12211232
'Antarctica/Palmer',
12221233
'Antarctica/Rothera',
1234+
'Antarctica/South_Pole',
12231235
'Antarctica/Syowa',
12241236
'Antarctica/Vostok',
1237+
'Arctic/Longyearbyen',
12251238
'Asia/Aden',
12261239
'Asia/Almaty',
12271240
'Asia/Amman',
@@ -1331,42 +1344,54 @@ def _test():
13311344
'Europe/Athens',
13321345
'Europe/Belgrade',
13331346
'Europe/Berlin',
1347+
'Europe/Bratislava',
13341348
'Europe/Brussels',
13351349
'Europe/Bucharest',
13361350
'Europe/Budapest',
13371351
'Europe/Chisinau',
13381352
'Europe/Copenhagen',
13391353
'Europe/Dublin',
13401354
'Europe/Gibraltar',
1355+
'Europe/Guernsey',
13411356
'Europe/Helsinki',
1357+
'Europe/Isle_of_Man',
13421358
'Europe/Istanbul',
1359+
'Europe/Jersey',
13431360
'Europe/Kaliningrad',
13441361
'Europe/Kiev',
13451362
'Europe/Lisbon',
1363+
'Europe/Ljubljana',
13461364
'Europe/London',
13471365
'Europe/Luxembourg',
13481366
'Europe/Madrid',
13491367
'Europe/Malta',
1368+
'Europe/Mariehamn',
13501369
'Europe/Minsk',
13511370
'Europe/Monaco',
13521371
'Europe/Moscow',
13531372
'Europe/Oslo',
13541373
'Europe/Paris',
1374+
'Europe/Podgorica',
13551375
'Europe/Prague',
13561376
'Europe/Riga',
13571377
'Europe/Rome',
13581378
'Europe/Samara',
1379+
'Europe/San_Marino',
1380+
'Europe/Sarajevo',
13591381
'Europe/Simferopol',
1382+
'Europe/Skopje',
13601383
'Europe/Sofia',
13611384
'Europe/Stockholm',
13621385
'Europe/Tallinn',
13631386
'Europe/Tirane',
13641387
'Europe/Uzhgorod',
13651388
'Europe/Vaduz',
1389+
'Europe/Vatican',
13661390
'Europe/Vienna',
13671391
'Europe/Vilnius',
13681392
'Europe/Volgograd',
13691393
'Europe/Warsaw',
1394+
'Europe/Zagreb',
13701395
'Europe/Zaporozhye',
13711396
'Europe/Zurich',
13721397
'GMT',
@@ -1384,6 +1409,7 @@ def _test():
13841409
'Pacific/Apia',
13851410
'Pacific/Auckland',
13861411
'Pacific/Chatham',
1412+
'Pacific/Chuuk',
13871413
'Pacific/Easter',
13881414
'Pacific/Efate',
13891415
'Pacific/Enderbury',
@@ -1409,14 +1435,13 @@ def _test():
14091435
'Pacific/Pago_Pago',
14101436
'Pacific/Palau',
14111437
'Pacific/Pitcairn',
1412-
'Pacific/Ponape',
1438+
'Pacific/Pohnpei',
14131439
'Pacific/Port_Moresby',
14141440
'Pacific/Rarotonga',
14151441
'Pacific/Saipan',
14161442
'Pacific/Tahiti',
14171443
'Pacific/Tarawa',
14181444
'Pacific/Tongatapu',
1419-
'Pacific/Truk',
14201445
'Pacific/Wake',
14211446
'Pacific/Wallis',
14221447
'US/Alaska',

0 commit comments

Comments
 (0)