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




Showing 2 results of 2

From: <js...@us...> - 2008年09月29日 17:30:27
Revision: 6134
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6134&view=rev
Author: jswhit
Date: 2008年09月29日 17:30:14 +0000 (2008年9月29日)
Log Message:
-----------
fix typo
Modified Paths:
--------------
 trunk/toolkits/basemap/examples/warpimage.py
Modified: trunk/toolkits/basemap/examples/warpimage.py
===================================================================
--- trunk/toolkits/basemap/examples/warpimage.py	2008年09月29日 07:06:28 UTC (rev 6133)
+++ trunk/toolkits/basemap/examples/warpimage.py	2008年09月29日 17:30:14 UTC (rev 6134)
@@ -30,7 +30,7 @@
 # draw lat/lon grid lines every 30 degrees.
 m.drawmeridians(np.arange(0,360,60),color='0.5')
 m.drawparallels(np.arange(-90,90,30),color='0.5')
-plt.title("Blue Marble image warped from 'cyl' to 'robinso' projection",fontsize=12)
+plt.title("Blue Marble image warped from 'cyl' to 'robinson' projection",fontsize=12)
 print 'warp to robinson map ...'
 
 # create new figure
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <ef...@us...> - 2008年09月29日 07:06:41
Revision: 6133
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6133&view=rev
Author: efiring
Date: 2008年09月29日 07:06:28 +0000 (2008年9月29日)
Log Message:
-----------
Add dpi kwarg and docstring to Text.get_window_extent()
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/text.py
Modified: trunk/matplotlib/lib/matplotlib/text.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/text.py	2008年09月28日 22:05:23 UTC (rev 6132)
+++ trunk/matplotlib/lib/matplotlib/text.py	2008年09月29日 07:06:28 UTC (rev 6133)
@@ -166,7 +166,7 @@
 self._rotation = rotation
 self._fontproperties = fontproperties
 self._bbox = None
- self._bbox_patch = None # a FanceBboxPatch instance
+ self._bbox_patch = None # a FancyBboxPatch instance
 self._renderer = None
 if linespacing is None:
 linespacing = 1.2 # Maybe use rcParam later.
@@ -356,7 +356,7 @@
 
 def get_bbox_patch(self):
 """
- Retrun the bbox Patch object. Returns None if the the
+ Return the bbox Patch object. Returns None if the the
 FancyBboxPatch is not made.
 """
 return self._bbox_patch
@@ -519,9 +519,32 @@
 "Return the vertical alignment as string"
 return self._verticalalignment
 
- def get_window_extent(self, renderer=None):
+ def get_window_extent(self, renderer=None, dpi=None):
+ '''
+ Return a Bbox bounding the text, in display units (dots).
+
+ In addition to being used internally,
+ this is useful for specifying clickable regions in
+ a png file on a web page.
+
+ *renderer* defaults to the _renderer attribute of the
+ text object. This is not assigned until the first execution
+ of the draw() method, so you must use this kwarg if you
+ want to call get_window_extent() prior to the first draw().
+ For getting web page regions, it is simpler to call the
+ method after saving the figure.
+
+ *dpi* defaults to self.figure.dpi; the renderer dpi is
+ irrelevant. For the web application, if figure.dpi is not
+ the value used when saving the figure, then the value that
+ was used must be specified as the *dpi* argument.
+
+ '''
 #return _unit_box
 if not self.get_visible(): return Bbox.unit()
+ if dpi is not None:
+ dpi_orig = self.figure.dpi
+ self.figure.dpi = dpi
 if self._text == '':
 tx, ty = self._get_xy_display()
 return Bbox.from_bounds(tx,ty,0,0)
@@ -531,11 +554,12 @@
 if self._renderer is None:
 raise RuntimeError('Cannot get window extent w/o renderer')
 
- angle = self.get_rotation()
 bbox, info = self._get_layout(self._renderer)
 x, y = self.get_position()
 x, y = self.get_transform().transform_point((x, y))
 bbox = bbox.translated(x, y)
+ if dpi is not None:
+ self.figure.dpi = dpi_orig
 return bbox
 
 def set_backgroundcolor(self, color):
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 によって変換されたページ (->オリジナル) /