SourceForge logo
SourceForge logo
Menu

matplotlib-checkins — Commit notification. DO NOT POST to this list, just subscribe to it.

You can subscribe to this list here.

2007 Jan
Feb
Mar
Apr
May
Jun
Jul
(115)
Aug
(120)
Sep
(137)
Oct
(170)
Nov
(461)
Dec
(263)
2008 Jan
(120)
Feb
(74)
Mar
(35)
Apr
(74)
May
(245)
Jun
(356)
Jul
(240)
Aug
(115)
Sep
(78)
Oct
(225)
Nov
(98)
Dec
(271)
2009 Jan
(132)
Feb
(84)
Mar
(74)
Apr
(56)
May
(90)
Jun
(79)
Jul
(83)
Aug
(296)
Sep
(214)
Oct
(76)
Nov
(82)
Dec
(66)
2010 Jan
(46)
Feb
(58)
Mar
(51)
Apr
(77)
May
(58)
Jun
(126)
Jul
(128)
Aug
(64)
Sep
(50)
Oct
(44)
Nov
(48)
Dec
(54)
2011 Jan
(68)
Feb
(52)
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
(1)
2018 Jan
Feb
Mar
Apr
May
(1)
Jun
Jul
Aug
Sep
Oct
Nov
Dec
S M T W T F S



1
(16)
2
(7)
3
(4)
4
5
6
(4)
7
(5)
8
(6)
9
(7)
10
(4)
11
12
(2)
13
(5)
14
(3)
15
16
(5)
17
(1)
18
19
20
(5)
21
(7)
22
(3)
23
(5)
24
(1)
25
26
27
(6)
28
(7)
29
(3)
30
(8)
31
(6)

Showing 3 results of 3

Revision: 3730
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3730&view=rev
Author: dsdale
Date: 2007年08月22日 13:11:18 -0700 (2007年8月22日)
Log Message:
-----------
rcdefaults working with mplconfig
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/config/mplconfig.py
Modified: trunk/matplotlib/lib/matplotlib/config/mplconfig.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/config/mplconfig.py	2007年08月22日 19:38:08 UTC (rev 3729)
+++ trunk/matplotlib/lib/matplotlib/config/mplconfig.py	2007年08月22日 20:11:18 UTC (rev 3730)
@@ -516,10 +516,14 @@
 config_file)
 
 def rcdefaults():
- global mplConfig
- mplConfig = MPLConfig()
- rcParams.update(rcParamsDefault)
+ """
+ Restore the default rc params - the ones that were created at
+ matplotlib load time
+ """
+ for key in rcParamsDefault.keys():
+ rcParams[key] = rcParamsDefault[key]
 
+
 ##############################################################################
 # Auto-generate the mpl-data/matplotlib.conf
 ##############################################################################
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <md...@us...> - 2007年08月22日 19:38:18
Revision: 3729
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3729&view=rev
Author: mdboom
Date: 2007年08月22日 12:38:08 -0700 (2007年8月22日)
Log Message:
-----------
Make rcParams.update(rcParamsDefault) when new traited config is
switched on.
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/config/mplconfig.py
 trunk/matplotlib/lib/matplotlib/config/mpltraits.py
 trunk/matplotlib/lib/matplotlib/rcsetup.py
Modified: trunk/matplotlib/lib/matplotlib/config/mplconfig.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/config/mplconfig.py	2007年08月22日 18:43:13 UTC (rev 3728)
+++ trunk/matplotlib/lib/matplotlib/config/mplconfig.py	2007年08月22日 19:38:08 UTC (rev 3729)
@@ -161,12 +161,14 @@
 dvipnghack = T.false
 
 class mathtext(TConfig):
- cal = T.Trait("['cursive']", mplT.FontPropertiesHandler())
- rm = T.Trait("['serif']", mplT.FontPropertiesHandler())
- tt = T.Trait("['monospace']", mplT.FontPropertiesHandler())
- it = T.Trait("['serif'], style='oblique'", mplT.FontPropertiesHandler())
- bf = T.Trait("['serif'], weight='bold'", mplT.FontPropertiesHandler())
- sf = T.Trait("['sans-serif']", mplT.FontPropertiesHandler())
+ handler = mplT.FontPropertiesHandler
+ proxy = handler.FontPropertiesProxy
+ cal = T.Trait(proxy(['cursive']), handler())
+ rm = T.Trait(proxy(['serif']), handler())
+ tt = T.Trait(proxy(['monospace']), handler())
+ it = T.Trait(proxy(['serif'], style='oblique'), handler())
+ bf = T.Trait(proxy(['serif'], weight='bold'), handler())
+ sf = T.Trait(proxy(['sans-serif']), handler())
 use_cm = T.true
 fallback_to_cm = T.true
 
Modified: trunk/matplotlib/lib/matplotlib/config/mpltraits.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/config/mpltraits.py	2007年08月22日 18:43:13 UTC (rev 3728)
+++ trunk/matplotlib/lib/matplotlib/config/mpltraits.py	2007年08月22日 19:38:08 UTC (rev 3729)
@@ -146,7 +146,7 @@
 'spring_r', 'summer', 'summer_r', 'winter', 'winter_r']
 
 class FontPropertiesHandler(T.TraitHandler):
- class FontPropertiesProxy:
+ class FontPropertiesProxy(object):
 # In order to build a FontProperties object, various rcParams must
 # already be known in order to set default values. That means a
 # FontProperties object can not be created from a config file,
@@ -192,8 +192,6 @@
 
 def validate(self, object, name, value):
 from matplotlib.font_manager import FontProperties
- if isinstance(value, FontProperties):
- return value
 if is_string_like(value):
 try:
 proxy = eval("FontProperties(%s)" % value,
@@ -202,7 +200,9 @@
 pass
 else:
 return proxy
+ else:
+ return value
 self.error(object, name, value)
 
 def info(self):
- return 'Represents a set of font properties. Must be a FontProperties object or a string containing the parameters to the FontProperties constructor.'
+ return 'a FontProperties object or a string containing the parameters to the FontProperties constructor.'
Modified: trunk/matplotlib/lib/matplotlib/rcsetup.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/rcsetup.py	2007年08月22日 18:43:13 UTC (rev 3728)
+++ trunk/matplotlib/lib/matplotlib/rcsetup.py	2007年08月22日 19:38:08 UTC (rev 3729)
@@ -198,7 +198,7 @@
 except ValueError:
 raise ValueError('not a valid font size')
 
-class FontPropertiesProxy:
+class FontPropertiesProxy(object):
 # In order to build a FontProperties object, various rcParams must
 # already be known in order to set default values. That means a
 # FontProperties object can not be created from a config file,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 3728
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3728&view=rev
Author: dsdale
Date: 2007年08月22日 11:43:13 -0700 (2007年8月22日)
Log Message:
-----------
add an update method to rcParamsWrapper
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/config/mplconfig.py
Modified: trunk/matplotlib/lib/matplotlib/config/mplconfig.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/config/mplconfig.py	2007年08月21日 19:42:28 UTC (rev 3727)
+++ trunk/matplotlib/lib/matplotlib/config/mplconfig.py	2007年08月22日 18:43:13 UTC (rev 3728)
@@ -461,7 +461,18 @@
 def has_key(self, val):
 return self.tconfig_map.has_key(val)
 
+ def update(self, arg, **kwargs):
+ try:
+ for key in arg:
+ self[key] = arg[key]
+ except AttributeError:
+ for key, val in arg:
+ self[key] = val
+ 
+ for key in kwargs:
+ self[key] = kwargs[key]
 
+
 old_config_file = cutils.get_config_file(tconfig=False)
 old_config_path = os.path.split(old_config_file)[0]
 config_file = os.path.join(old_config_path, 'matplotlib.conf')
@@ -503,8 +514,9 @@
 config_file)
 
 def rcdefaults():
+ global mplConfig
 mplConfig = MPLConfig()
- rcParams = RcParamsWrapper(mplConfig)
+ rcParams.update(rcParamsDefault)
 
 ##############################################################################
 # Auto-generate the mpl-data/matplotlib.conf
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

Showing 3 results of 3

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /