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






Showing 2 results of 2

From: <ef...@us...> - 2009年05月01日 19:04:09
Revision: 7077
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7077&view=rev
Author: efiring
Date: 2009年05月01日 19:04:06 +0000 (2009年5月01日)
Log Message:
-----------
Make Axes.add_artist etc. return their argument.
Modified Paths:
--------------
 trunk/matplotlib/CHANGELOG
 trunk/matplotlib/lib/matplotlib/axes.py
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG	2009年05月01日 18:05:12 UTC (rev 7076)
+++ trunk/matplotlib/CHANGELOG	2009年05月01日 19:04:06 UTC (rev 7077)
@@ -1,4 +1,6 @@
 ======================================================================
+2009年05月01日 Changed add_artist and similar Axes methods to
+ return their argument. - EF
 
 2009年04月30日 Incorrect eps bbox for landscape mode fixed - JJL
 
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py	2009年05月01日 18:05:12 UTC (rev 7076)
+++ trunk/matplotlib/lib/matplotlib/axes.py	2009年05月01日 19:04:06 UTC (rev 7077)
@@ -1323,17 +1323,24 @@
 len(self.patches))>0
 
 def add_artist(self, a):
- 'Add any :class:`~matplotlib.artist.Artist` to the axes'
+ '''
+ Add any :class:`~matplotlib.artist.Artist` to the axes
+
+ Returns the artist.
+ '''
 a.set_axes(self)
 self.artists.append(a)
 self._set_artist_props(a)
 a.set_clip_path(self.patch)
 a._remove_method = lambda h: self.artists.remove(h)
+ return a
 
 def add_collection(self, collection, autolim=True):
 '''
 add a :class:`~matplotlib.collections.Collection` instance
 to the axes
+
+ Returns the collection.
 '''
 label = collection.get_label()
 if not label:
@@ -1348,11 +1355,14 @@
 self.update_datalim(collection.get_datalim(self.transData))
 
 collection._remove_method = lambda h: self.collections.remove(h)
+ return collection
 
 def add_line(self, line):
 '''
 Add a :class:`~matplotlib.lines.Line2D` to the list of plot
 lines
+
+ Returns the line.
 '''
 self._set_artist_props(line)
 if line.get_clip_path() is None:
@@ -1363,6 +1373,7 @@
 line.set_label('_line%d'%len(self.lines))
 self.lines.append(line)
 line._remove_method = lambda h: self.lines.remove(h)
+ return line
 
 def _update_line_limits(self, line):
 p = line.get_path()
@@ -1378,6 +1389,8 @@
 axes patches; the clipbox will be set to the Axes clipping
 box. If the transform is not set, it will be set to
 :attr:`transData`.
+
+ Returns the patch.
 """
 
 self._set_artist_props(p)
@@ -1386,6 +1399,7 @@
 self._update_patch_limits(p)
 self.patches.append(p)
 p._remove_method = lambda h: self.patches.remove(h)
+ return p
 
 def _update_patch_limits(self, patch):
 'update the data limits for patch *p*'
@@ -1412,11 +1426,14 @@
 '''
 Add a :class:`~matplotlib.tables.Table` instance to the
 list of axes tables
+
+ Returns the table.
 '''
 self._set_artist_props(tab)
 self.tables.append(tab)
 tab.set_clip_path(self.patch)
 tab._remove_method = lambda h: self.tables.remove(h)
+ return tab
 
 def relim(self):
 'recompute the data limits based on current artists'
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 7076
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7076&view=rev
Author: mdboom
Date: 2009年05月01日 18:05:12 +0000 (2009年5月01日)
Log Message:
-----------
Scale fonts correctly for Mac OS-X backend. (Patch contributed by Michiel de Hoon).
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/backends/backend_macosx.py
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_macosx.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_macosx.py	2009年04月30日 17:31:23 UTC (rev 7075)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_macosx.py	2009年05月01日 18:05:12 UTC (rev 7076)
@@ -107,7 +107,6 @@
 n = self.gc.level() - gc.level()
 for i in range(n): self.gc.restore()
 self.gc = gc
- size = prop.get_size_in_points()
 ox, oy, width, height, descent, image, used_characters = \
 self.mathtext_parser.parse(s, self.dpi, prop)
 gc.draw_mathtext(x, y, angle, 255 - image.as_array())
@@ -121,15 +120,15 @@
 self._draw_mathtext(gc, x, y, s, prop, angle)
 else:
 family = prop.get_family()
- size = prop.get_size_in_points()
 weight = prop.get_weight()
 style = prop.get_style()
+ points = prop.get_size_in_points()
+ size = self.points_to_pixels(points)
 gc.draw_text(x, y, unicode(s), family, size, weight, style, angle)
 
 def get_text_width_height_descent(self, s, prop, ismath):
 if ismath=='TeX':
 # todo: handle props
- size = prop.get_size_in_points()
 texmanager = self.get_texmanager()
 fontsize = prop.get_size_in_points()
 w, h, d = texmanager.get_text_width_height_descent(s, fontsize,
@@ -140,9 +139,10 @@
 self.mathtext_parser.parse(s, self.dpi, prop)
 return width, height, descent
 family = prop.get_family()
- size = prop.get_size_in_points()
 weight = prop.get_weight()
 style = prop.get_style()
+ points = prop.get_size_in_points()
+ size = self.points_to_pixels(points)
 width, height, descent = self.gc.get_text_width_height_descent(unicode(s), family, size, weight, style)
 return width, height, 0.0*descent
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

Showing 2 results of 2

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 によって変換されたページ (->オリジナル) /