SourceForge logo
SourceForge logo
Menu

matplotlib-checkins

From: <ef...@us...> - 2008年09月17日 18:30:54
Revision: 6105
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6105&view=rev
Author: efiring
Date: 2008年09月18日 01:30:52 +0000 (2008年9月18日)
Log Message:
-----------
validate num argument to figure()
Otherwise, the resulting exception can be obscure and delayed.
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/pyplot.py
Modified: trunk/matplotlib/lib/matplotlib/pyplot.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/pyplot.py	2008年09月18日 00:49:15 UTC (rev 6104)
+++ trunk/matplotlib/lib/matplotlib/pyplot.py	2008年09月18日 01:30:52 UTC (rev 6105)
@@ -184,7 +184,7 @@
 """
 call signature::
 
- figure(num = None, figsize=(8, 6), dpi=80, facecolor='w', edgecolor='k')
+ figure(num=None, figsize=(8, 6), dpi=80, facecolor='w', edgecolor='k')
 
 
 Create a new figure and return a :class:`matplotlib.figure.Figure`
@@ -234,7 +234,10 @@
 num = max(allnums) + 1
 else:
 num = 1
+ else:
+ num = int(num) # crude validation of num argument
 
+
 figManager = _pylab_helpers.Gcf.get_fig_manager(num)
 if figManager is None:
 if get_backend().lower() == 'ps': dpi = 72
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <ef...@us...> - 2008年10月22日 19:38:59
Revision: 6300
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6300&view=rev
Author: efiring
Date: 2008年10月22日 19:38:46 +0000 (2008年10月22日)
Log Message:
-----------
Make pyplot.twinx() and twiny() draw after creating the axes
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/pyplot.py
Modified: trunk/matplotlib/lib/matplotlib/pyplot.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/pyplot.py	2008年10月22日 19:37:46 UTC (rev 6299)
+++ trunk/matplotlib/lib/matplotlib/pyplot.py	2008年10月22日 19:38:46 UTC (rev 6300)
@@ -631,12 +631,13 @@
 the right, and the *ax2* instance is returned.
 
 .. seealso::
- :file:`examples/pylab_examples/two_scales.py`
+ :file:`examples/api_examples/two_scales.py`
 """
 if ax is None:
 ax=gca()
+ ax1 = ax.twinx()
 draw_if_interactive()
- return ax.twinx()
+ return ax1
 
 
 def twiny(ax=None):
@@ -647,8 +648,9 @@
 """
 if ax is None:
 ax=gca()
+ ax1 = ax.twiny()
 draw_if_interactive()
- return ax.twiny()
+ return ax1
 
 
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <ry...@us...> - 2008年12月02日 17:53:48
Revision: 6472
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6472&view=rev
Author: ryanmay
Date: 2008年12月02日 17:53:45 +0000 (2008年12月02日)
Log Message:
-----------
Add information to docstring for pyplot.subplot()
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/pyplot.py
Modified: trunk/matplotlib/lib/matplotlib/pyplot.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/pyplot.py	2008年12月02日 17:11:07 UTC (rev 6471)
+++ trunk/matplotlib/lib/matplotlib/pyplot.py	2008年12月02日 17:53:45 UTC (rev 6472)
@@ -588,11 +588,6 @@
 
 ``subplot(111)`` is the default axis.
 
- The background color of the subplot can be specified via keyword
- argument *axisbg*, which takes a color string as value, as in::
-
- subplot(211, axisbg='y')
-
 New subplots that overlap old will delete the old axes. If you do
 not want this behavior, use
 :meth:`matplotlib.figure.Figure.add_subplot` or the
@@ -602,11 +597,35 @@
 plot([1,2,3]) # implicitly creates subplot(111)
 subplot(211) # overlaps, subplot(111) is killed
 plot(rand(12), rand(12))
+ subplot(212, axisbg='y') # creates 2nd subplot with yellow background
 
+ Keyword arguments:
+
+ *axisbg*:
+ The background color of the subplot, which can be any valid
+ color specifier. See :module:`matplotlib.colors` for more
+ information.
+
+ *polar*:
+ A boolean flag indicating whether the subplot plot should be
+ a polar projection. Defaults to False.
+
+ *projection*:
+ A string giving the name of a custom projection to be used
+ for the subplot. This projection must have been previously
+ registered. See :func:`matplotlib.projections.register_projection`
+
 .. seealso::
 :func:`~matplotlib.pyplot.axes`:
 For additional information on :func:`axes` and
 :func:`subplot` keyword arguments.
+
+ :file:`examples/pylab_examples/polar_scatter.py`
+
+ **Example:**
+
+ .. plot:: mpl_examples/pylab_examples/subplot_demo.py
+
 """
 
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jo...@us...> - 2009年04月26日 10:29:37
Revision: 7066
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7066&view=rev
Author: jouni
Date: 2009年04月26日 10:29:30 +0000 (2009年4月26日)
Log Message:
-----------
Mention rotate kwarg in xticks and yticks docstrings
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/pyplot.py
Modified: trunk/matplotlib/lib/matplotlib/pyplot.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/pyplot.py	2009年04月24日 22:44:34 UTC (rev 7065)
+++ trunk/matplotlib/lib/matplotlib/pyplot.py	2009年04月26日 10:29:30 UTC (rev 7066)
@@ -983,7 +983,9 @@
 xticks( arange(5), ('Tom', 'Dick', 'Harry', 'Sally', 'Sue') )
 
 The keyword args, if any, are :class:`~matplotlib.text.Text`
- properties.
+ properties. For example, to rotate long labels::
+
+ xticks( arange(12), calendar.month_name[1:13], rotation=17 )
 """
 ax = gca()
 
@@ -1019,7 +1021,9 @@
 yticks( arange(5), ('Tom', 'Dick', 'Harry', 'Sally', 'Sue') )
 
 The keyword args, if any, are :class:`~matplotlib.text.Text`
- properties.
+ properties. For example, to rotate long labels::
+
+ yticks( arange(12), calendar.month_name[1:13], rotation=45 )
 """
 ax = gca()
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <ry...@us...> - 2009年08月06日 18:49:32
Revision: 7406
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7406&view=rev
Author: ryanmay
Date: 2009年08月06日 18:49:24 +0000 (2009年8月06日)
Log Message:
-----------
Don't leave colorbar_doc as part of the pyplot namespace.
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/pyplot.py
Modified: trunk/matplotlib/lib/matplotlib/pyplot.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/pyplot.py	2009年08月06日 17:09:25 UTC (rev 7405)
+++ trunk/matplotlib/lib/matplotlib/pyplot.py	2009年08月06日 18:49:24 UTC (rev 7406)
@@ -1359,7 +1359,6 @@
 ## Plotting part 1: manually generated functions and wrappers ##
 
 
-from matplotlib.colorbar import colorbar_doc
 def colorbar(mappable=None, cax=None, ax=None, **kw):
 if mappable is None:
 mappable = gci()
@@ -1369,7 +1368,7 @@
 ret = gcf().colorbar(mappable, cax = cax, ax=ax, **kw)
 draw_if_interactive()
 return ret
-colorbar.__doc__ = colorbar_doc
+colorbar.__doc__ = matplotlib.colorbar.colorbar_doc
 
 def clim(vmin=None, vmax=None):
 """
@@ -2691,5 +2690,3 @@
 if im is not None:
 im.set_cmap(cm.spectral)
 draw_if_interactive()
-
-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <ry...@us...> - 2009年08月06日 19:24:51
Revision: 7408
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7408&view=rev
Author: ryanmay
Date: 2009年08月06日 19:24:40 +0000 (2009年8月06日)
Log Message:
-----------
Add missing import.
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/pyplot.py
Modified: trunk/matplotlib/lib/matplotlib/pyplot.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/pyplot.py	2009年08月06日 18:51:58 UTC (rev 7407)
+++ trunk/matplotlib/lib/matplotlib/pyplot.py	2009年08月06日 19:24:40 UTC (rev 7408)
@@ -1358,7 +1358,7 @@
 
 ## Plotting part 1: manually generated functions and wrappers ##
 
-
+import matplotlib.colorbar
 def colorbar(mappable=None, cax=None, ax=None, **kw):
 if mappable is None:
 mappable = gci()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <ry...@us...> - 2009年09月28日 21:58:18
Revision: 7832
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7832&view=rev
Author: ryanmay
Date: 2009年09月28日 21:58:10 +0000 (2009年9月28日)
Log Message:
-----------
Update a couple of remaining uses of gci._current to sci().
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/pyplot.py
Modified: trunk/matplotlib/lib/matplotlib/pyplot.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/pyplot.py	2009年09月28日 17:40:49 UTC (rev 7831)
+++ trunk/matplotlib/lib/matplotlib/pyplot.py	2009年09月28日 21:58:10 UTC (rev 7832)
@@ -401,7 +401,7 @@
 # allow callers to override the hold state by passing hold=True|False
 ret = gcf().figimage(*args, **kwargs)
 draw_if_interactive()
- gci._current = ret
+ sci(ret)
 return ret
 
 def figlegend(handles, labels, loc, **kwargs):
@@ -1444,7 +1444,7 @@
 ax = fig.add_axes([0.15, 0.09, 0.775, 0.775])
 
 im = ax.matshow(A, **kw)
- gci._current = im
+ sci(im)
 
 draw_if_interactive()
 return im
@@ -2629,7 +2629,3 @@
 if im is not None:
 im.set_cmap(cm.spectral)
 draw_if_interactive()
-
-
-
-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <wea...@us...> - 2011年02月07日 22:49:15
Revision: 8957
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8957&view=rev
Author: weathergod
Date: 2011年02月07日 22:49:09 +0000 (2011年2月07日)
Log Message:
-----------
Removed misleading returns in xscale() and yscale().
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/pyplot.py
Modified: trunk/matplotlib/lib/matplotlib/pyplot.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/pyplot.py	2011年02月07日 16:51:04 UTC (rev 8956)
+++ trunk/matplotlib/lib/matplotlib/pyplot.py	2011年02月07日 22:49:09 UTC (rev 8957)
@@ -1131,10 +1131,9 @@
 %(scale_docs)s
 """
 ax = gca()
- ret = ax.set_xscale(*args, **kwargs)
+ ax.set_xscale(*args, **kwargs)
 draw_if_interactive()
- return ret
-
+ 
 @docstring.dedent_interpd
 def yscale(*args, **kwargs):
 """
@@ -1149,10 +1148,9 @@
 %(scale_docs)s
 """
 ax = gca()
- ret = ax.set_yscale(*args, **kwargs)
+ ax.set_yscale(*args, **kwargs)
 draw_if_interactive()
- return ret
-
+ 
 def xticks(*args, **kwargs):
 """
 Set/Get the xlimits of the current ticklocs and labels::
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
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 によって変換されたページ (->オリジナル) /