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 7 results of 7

Revision: 6132
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6132&view=rev
Author: efiring
Date: 2008年09月28日 22:05:23 +0000 (2008年9月28日)
Log Message:
-----------
Fix mri_with_eeg.py; it was not rescaling or printing correctly.
Modified Paths:
--------------
 trunk/matplotlib/examples/pylab_examples/mri_with_eeg.py
Modified: trunk/matplotlib/examples/pylab_examples/mri_with_eeg.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/mri_with_eeg.py	2008年09月28日 13:32:55 UTC (rev 6131)
+++ trunk/matplotlib/examples/pylab_examples/mri_with_eeg.py	2008年09月28日 22:05:23 UTC (rev 6132)
@@ -4,16 +4,18 @@
 faster*
 """
 from __future__ import division
-from pylab import *
-from matplotlib.lines import Line2D
-from matplotlib.transforms import Bbox, BboxTransform, BboxTransformTo, Affine2D
 
+import numpy as np
+
+from matplotlib.pyplot import *
+from matplotlib.collections import LineCollection
+
 # I use if 1 to break up the different regions of code visually
 
 if 1: # load the data
 # data are 256x256 16 bit integers
 dfile = '../data/s1045.ima'
- im = fromstring(file(dfile, 'rb').read(), uint16).astype(float)
+ im = np.fromstring(file(dfile, 'rb').read(), np.uint16).astype(float)
 im.shape = 256, 256
 
 if 1: # plot the MRI in pcolor
@@ -23,8 +25,8 @@
 
 if 1: # plot the histogram of MRI intensity
 subplot(222)
- im = ravel(im)
- im = ravel(take(im, nonzero(im))) # ignore the background
+ im = np.ravel(im)
+ im = im[np.nonzero(im)] # ignore the background
 im = im/(2.0**15) # normalize
 hist(im, 100)
 xticks([-1, -.5, 0, .5, 1])
@@ -36,52 +38,38 @@
 # load the data
 
 numSamples, numRows = 800,4
- data = fromstring(file('../data/eeg.dat', 'rb').read(), float)
+ data = np.fromstring(file('../data/eeg.dat', 'rb').read(), float)
 data.shape = numSamples, numRows
- t = arange(numSamples)/float(numSamples)*10.0
+ t = 10.0 * np.arange(numSamples, dtype=float)/numSamples
 ticklocs = []
 ax = subplot(212)
 xlim(0,10)
- xticks(arange(10))
+ xticks(np.arange(10))
+ dmin = data.min()
+ dmax = data.max()
+ dr = (dmax - dmin)*0.7 # Crowd them a bit.
+ y0 = dmin
+ y1 = (numRows-1) * dr + dmax
+ ylim(y0, y1)
 
- boxin = Bbox.from_extents(ax.viewLim.x0, -20, ax.viewLim.x1, 20)
-
- height = ax.bbox.height
- boxout = Bbox.from_extents(ax.bbox.x0, -1.0 * height,
- ax.bbox.x1, 1.0 * height)
-
- transOffset = BboxTransformTo(
- Bbox.from_extents(0.0, ax.bbox.y0, 1.0, ax.bbox.y1))
-
-
+ segs = []
 for i in range(numRows):
- # effectively a copy of transData
- trans = BboxTransform(boxin, boxout)
- offset = (i+1)/(numRows+1)
+ segs.append(np.hstack((t[:,np.newaxis], data[:,i,np.newaxis])))
+ ticklocs.append(i*dr)
 
- trans += Affine2D().translate(*transOffset.transform_point((0, offset)))
+ offsets = np.zeros((numRows,2), dtype=float)
+ offsets[:,1] = ticklocs
 
- thisLine = Line2D(
- t, data[:,i]-data[0,i],
- )
+ lines = LineCollection(segs, offsets=offsets,
+ transOffset=None,
+ )
 
- thisLine.set_transform(trans)
+ ax.add_collection(lines)
 
- ax.add_line(thisLine)
- ticklocs.append(offset)
-
- setp(gca(), 'yticklabels', ['PG3', 'PG5', 'PG7', 'PG9'])
-
 # set the yticks to use axes coords on the y axis
 ax.set_yticks(ticklocs)
- for tick in ax.yaxis.get_major_ticks():
- tick.label1.set_transform(ax.transAxes)
- tick.label2.set_transform(ax.transAxes)
- tick.tick1line.set_transform(ax.transAxes)
- tick.tick2line.set_transform(ax.transAxes)
- tick.gridline.set_transform(ax.transAxes)
+ ax.set_yticklabels(['PG3', 'PG5', 'PG7', 'PG9'])
 
-
 xlabel('time (s)')
 
 show()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <js...@us...> - 2008年09月28日 13:33:02
Revision: 6131
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6131&view=rev
Author: jswhit
Date: 2008年09月28日 13:32:55 +0000 (2008年9月28日)
Log Message:
-----------
remove debug statements
Modified Paths:
--------------
 trunk/toolkits/basemap/examples/warpimage.py
Modified: trunk/toolkits/basemap/examples/warpimage.py
===================================================================
--- trunk/toolkits/basemap/examples/warpimage.py	2008年09月28日 13:29:21 UTC (rev 6130)
+++ trunk/toolkits/basemap/examples/warpimage.py	2008年09月28日 13:32:55 UTC (rev 6131)
@@ -60,8 +60,6 @@
 m.drawparallels(np.arange(-90,90,30),labels=[1,0,0,0],color='0.5')
 plt.title("Blue Marble image - non-native 'cyl' projection",fontsize=12)
 print 'plot non-native cylindrical map (warping needed) ...'
-plt.show()
-raise SystemExit
 
 # create new figure
 fig=plt.figure()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 6130
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6130&view=rev
Author: jswhit
Date: 2008年09月28日 13:29:21 +0000 (2008年9月28日)
Log Message:
-----------
another fix for warpimage and 'cyl'
Modified Paths:
--------------
 trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py	2008年09月28日 13:26:18 UTC (rev 6129)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py	2008年09月28日 13:29:21 UTC (rev 6130)
@@ -3194,7 +3194,8 @@
 # bmproj is True if map projection region is same as
 # image region.
 bmproj = self.projection == 'cyl' and \
- self.llcrnrlon == -180 and self.urcrnrlon == 180
+ self.llcrnrlon == -180 and self.urcrnrlon == 180 and \
+ self.llcrnrlat == -90 and self.urcrnrlat == 90
 # read in jpeg image to rgba array of normalized floats.
 if not hasattr(self,'_bm_rgba') or newfile:
 pilImage = Image.open(self._bm_file)
@@ -3216,7 +3217,7 @@
 for k in range(3):
 tmp[:,:,k] = self._bm_rgba
 self._bm_rgba = tmp
- if cylproj:
+ if cylproj and not bmproj:
 # stack grids side-by-side (in longitiudinal direction), so
 # any range of longitudes may be plotted on a world map.
 self._bm_lons = \
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <js...@us...> - 2008年09月28日 13:26:25
Revision: 6129
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6129&view=rev
Author: jswhit
Date: 2008年09月28日 13:26:18 +0000 (2008年9月28日)
Log Message:
-----------
fix cyl example.
Modified Paths:
--------------
 trunk/toolkits/basemap/examples/warpimage.py
Modified: trunk/toolkits/basemap/examples/warpimage.py
===================================================================
--- trunk/toolkits/basemap/examples/warpimage.py	2008年09月28日 03:07:04 UTC (rev 6128)
+++ trunk/toolkits/basemap/examples/warpimage.py	2008年09月28日 13:26:18 UTC (rev 6129)
@@ -56,10 +56,12 @@
 # draw coastlines.
 m.drawcoastlines(linewidth=0.5,color='0.5')
 # draw lat/lon grid lines.
-m.drawmeridians(np.arange(-180,180,60),labels=[0,0,0,1],color='0.5')
+m.drawmeridians(np.arange(0,360,60),labels=[0,0,0,1],color='0.5')
 m.drawparallels(np.arange(-90,90,30),labels=[1,0,0,0],color='0.5')
 plt.title("Blue Marble image - non-native 'cyl' projection",fontsize=12)
 print 'plot non-native cylindrical map (warping needed) ...'
+plt.show()
+raise SystemExit
 
 # create new figure
 fig=plt.figure()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <ef...@us...> - 2008年09月28日 03:07:13
Revision: 6128
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6128&view=rev
Author: efiring
Date: 2008年09月28日 03:07:04 +0000 (2008年9月28日)
Log Message:
-----------
fixed cbook.flatten so its docstring example works
Previously, flatten(('a','b')) triggered infinite recursion.
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/cbook.py
Modified: trunk/matplotlib/lib/matplotlib/cbook.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/cbook.py	2008年09月28日 00:44:08 UTC (rev 6127)
+++ trunk/matplotlib/lib/matplotlib/cbook.py	2008年09月28日 03:07:04 UTC (rev 6128)
@@ -318,7 +318,10 @@
 return fh, opened
 return fh
 
-def flatten(seq, scalarp=is_scalar):
+def is_scalar_or_string(val):
+ return is_string_like(val) or not iterable(val)
+
+def flatten(seq, scalarp=is_scalar_or_string):
 """
 this generator flattens nested containers such as
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <ef...@us...> - 2008年09月28日 00:44:16
Revision: 6127
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6127&view=rev
Author: efiring
Date: 2008年09月28日 00:44:08 +0000 (2008年9月28日)
Log Message:
-----------
Enhancement to Axes.spy, and bugfixes:
figlegend was not plotting markers;
plot could not handle empty input arrays.
Modified Paths:
--------------
 trunk/matplotlib/CHANGELOG
 trunk/matplotlib/lib/matplotlib/axes.py
 trunk/matplotlib/lib/matplotlib/legend.py
 trunk/matplotlib/lib/matplotlib/lines.py
 trunk/matplotlib/lib/matplotlib/patches.py
 trunk/matplotlib/lib/matplotlib/transforms.py
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG	2008年09月28日 00:34:36 UTC (rev 6126)
+++ trunk/matplotlib/CHANGELOG	2008年09月28日 00:44:08 UTC (rev 6127)
@@ -1,3 +1,7 @@
+2008年09月27日 Allow spy to ignore zero values in sparse arrays, based
+ on patch by Tony Yu. Also fixed plot to handle empty
+ data arrays, and fixed handling of markers in figlegend. - EF
+
 2008年09月24日 Introduce drawstyles for lines. Transparently split linestyles
 like 'steps--' into drawstyle 'steps' and linestyle '--'.
 Legends always use drawstyle 'default'. - MM
@@ -81,7 +85,7 @@
 
 2008年07月24日 Rewrite of a significant portion of the clabel code (class
 	 ContourLabeler) to improve inlining. - DMK
- 
+
 2008年07月22日 Added Barbs polygon collection (similar to Quiver) for plotting
 wind barbs. Added corresponding helpers to Axes and pyplot as
 well. (examples/pylab_examples/barb_demo.py shows it off.) - RMM
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py	2008年09月28日 00:34:36 UTC (rev 6126)
+++ trunk/matplotlib/lib/matplotlib/axes.py	2008年09月28日 00:44:08 UTC (rev 6127)
@@ -309,7 +309,8 @@
 x = self.axes.convert_xunits(x)
 y = self.axes.convert_yunits(y)
 facecolor = self._get_next_cycle_color()
- seg = mpatches.Polygon(zip(x, y),
+ seg = mpatches.Polygon(np.hstack(
+ (x[:,np.newaxis],y[:,np.newaxis])),
 facecolor = facecolor,
 fill=True,
 closed=closed
@@ -355,7 +356,8 @@
 facecolor = color
 x = self.axes.convert_xunits(x)
 y = self.axes.convert_yunits(y)
- seg = mpatches.Polygon(zip(x, y),
+ seg = mpatches.Polygon(np.hstack(
+ (x[:,np.newaxis],y[:,np.newaxis])),
 facecolor = facecolor,
 fill=True,
 closed=closed
@@ -1282,9 +1284,10 @@
 line._remove_method = lambda h: self.lines.remove(h)
 
 def _update_line_limits(self, line):
- self.dataLim.update_from_path(line.get_path(),
- self.ignore_existing_data_limits)
- self.ignore_existing_data_limits = False
+ p = line.get_path()
+ if p.vertices.size > 0:
+ self.dataLim.update_from_path(p, self.ignore_existing_data_limits)
+ self.ignore_existing_data_limits = False
 
 def add_patch(self, p):
 """
@@ -1300,21 +1303,26 @@
 self.patches.append(p)
 p._remove_method = lambda h: self.patches.remove(h)
 
- def _update_patch_limits(self, p):
+ def _update_patch_limits(self, patch):
 'update the data limits for patch *p*'
 # hist can add zero height Rectangles, which is useful to keep
 # the bins, counts and patches lined up, but it throws off log
 # scaling. We'll ignore rects with zero height or width in
 # the auto-scaling
- if isinstance(p, mpatches.Rectangle) and (p.get_width()==0. or p.get_height()==0.):
+
+ if (isinstance(patch, mpatches.Rectangle) and
+ (patch.get_width()==0 or patch.get_height()==0)):
 return
- vertices = p.get_patch_transform().transform(p.get_path().vertices)
- if p.get_data_transform() != self.transData:
- transform = p.get_data_transform() + self.transData.inverted()
- xys = transform.transform(vertices)
- # Something is wrong--xys is never used.
- self.update_datalim(vertices)
+ vertices = patch.get_path().vertices
+ if vertices.size > 0:
+ xys = patch.get_patch_transform().transform(vertices)
+ if patch.get_data_transform() != self.transData:
+ transform = (patch.get_data_transform() +
+ self.transData.inverted())
+ xys = transform.transform(xys)
+ self.update_datalim(xys)
 
+
 def add_table(self, tab):
 '''
 Add a :class:`~matplotlib.tables.Table` instance to the
@@ -6645,7 +6653,7 @@
 return Pxx, freqs, bins, im
 
 def spy(self, Z, precision=None, marker=None, markersize=None,
- aspect='equal', **kwargs):
+ aspect='equal', **kwargs):
 """
 call signature::
 
@@ -6657,6 +6665,10 @@
 If *precision* is *None*, any non-zero value will be plotted;
 else, values of :math:`|Z| > precision` will be plotted.
 
+ For :class:`scipy.sparse.spmatrix` instances, there is a
+ special case: if *precision* is 0, any value present in
+ the array will be plotted, even if it is identically zero.
+
 The array will be plotted as it would be printed, with
 the first index (row) increasing down and the second
 index (column) increasing to the right.
@@ -6707,9 +6719,9 @@
 * ',' pixel
 
 """
+ if marker is None and markersize is None and hasattr(Z, 'tocoo'):
+ marker = 's'
 if marker is None and markersize is None:
- if hasattr(Z, 'tocoo'):
- raise TypeError, "Image mode does not support scipy.sparse arrays"
 Z = np.asarray(Z)
 if precision is None: mask = Z!=0.
 else: mask = np.absolute(Z)>precision
@@ -6723,23 +6735,33 @@
 else:
 if hasattr(Z, 'tocoo'):
 c = Z.tocoo()
- y = c.row
- x = c.col
- z = c.data
+ if precision == 0:
+ y = c.row
+ x = c.col
+ else:
+ if precision is None:
+ nonzero = c.data != 0.
+ else:
+ nonzero = np.absolute(c.data) > precision
+ y = c.row[nonzero]
+ x = c.col[nonzero]
 else:
 Z = np.asarray(Z)
- if precision is None: mask = Z!=0.
- else: mask = np.absolute(Z)>precision
- y,x,z = mlab.get_xyz_where(mask, mask)
+ if precision is None:
+ nonzero = Z!=0.
+ else:
+ nonzero = np.absolute(Z)>precision
+ y, x = np.nonzero(nonzero)
 if marker is None: marker = 's'
 if markersize is None: markersize = 10
- lines = self.plot(x, y, linestyle='None',
+ marks = mlines.Line2D(x, y, linestyle='None',
 marker=marker, markersize=markersize, **kwargs)
+ self.add_line(marks)
 nr, nc = Z.shape
 self.set_xlim(xmin=-0.5, xmax=nc-0.5)
 self.set_ylim(ymin=nr-0.5, ymax=-0.5)
 self.set_aspect(aspect)
- ret = lines
+ ret = marks
 self.title.set_y(1.05)
 self.xaxis.tick_top()
 self.xaxis.set_ticks_position('both')
Modified: trunk/matplotlib/lib/matplotlib/legend.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/legend.py	2008年09月28日 00:34:36 UTC (rev 6126)
+++ trunk/matplotlib/lib/matplotlib/legend.py	2008年09月28日 00:44:08 UTC (rev 6127)
@@ -264,13 +264,15 @@
 legline.set_clip_box(None)
 legline.set_clip_path(None)
 legline.set_drawstyle('default')
+ legline.set_marker('None')
 ret.append(legline)
- legline.set_marker('None')
 
 legline_marker = Line2D(xdata_marker, ydata[:len(xdata_marker)])
 legline_marker.update_from(handle)
+ self._set_artist_props(legline_marker)
+ legline_marker.set_clip_box(None)
+ legline_marker.set_clip_path(None)
 legline_marker.set_linestyle('None')
- self._set_artist_props(legline_marker)
 # we don't want to add this to the return list because
 # the texts and handles are assumed to be in one-to-one
 # correpondence.
Modified: trunk/matplotlib/lib/matplotlib/lines.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/lines.py	2008年09月28日 00:34:36 UTC (rev 6126)
+++ trunk/matplotlib/lib/matplotlib/lines.py	2008年09月28日 00:44:08 UTC (rev 6127)
@@ -81,14 +81,14 @@
 ' ' : '_draw_nothing',
 '' : '_draw_nothing',
 }
- 
+
 _drawStyles_l = {
 'default' : '_draw_lines',
 'steps-mid' : '_draw_steps_mid',
 'steps-pre' : '_draw_steps_pre',
 'steps-post' : '_draw_steps_post',
 }
- 
+
 _drawStyles_s = {
 'steps' : '_draw_steps_pre',
 }
Modified: trunk/matplotlib/lib/matplotlib/patches.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/patches.py	2008年09月28日 00:34:36 UTC (rev 6126)
+++ trunk/matplotlib/lib/matplotlib/patches.py	2008年09月28日 00:44:08 UTC (rev 6127)
@@ -408,7 +408,7 @@
 return self._rect_transform
 
 def contains(self, mouseevent):
- # special case the degernate rectangle
+ # special case the degenerate rectangle
 if self._width==0 or self._height==0:
 return False, {}
 
Modified: trunk/matplotlib/lib/matplotlib/transforms.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/transforms.py	2008年09月28日 00:34:36 UTC (rev 6126)
+++ trunk/matplotlib/lib/matplotlib/transforms.py	2008年09月28日 00:44:08 UTC (rev 6127)
@@ -801,6 +801,9 @@
 if ignore is None:
 ignore = self._ignore
 
+ if path.vertices.size == 0:
+ return
+
 points, minpos, changed = update_path_extents(
 path, None, self._points, self._minpos, ignore)
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <js...@us...> - 2008年09月28日 00:34:47
Revision: 6126
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6126&view=rev
Author: jswhit
Date: 2008年09月28日 00:34:36 +0000 (2008年9月28日)
Log Message:
-----------
added robinson and cyl tests
Modified Paths:
--------------
 trunk/toolkits/basemap/examples/warpimage.py
Modified: trunk/toolkits/basemap/examples/warpimage.py
===================================================================
--- trunk/toolkits/basemap/examples/warpimage.py	2008年09月27日 20:33:21 UTC (rev 6125)
+++ trunk/toolkits/basemap/examples/warpimage.py	2008年09月28日 00:34:36 UTC (rev 6126)
@@ -20,9 +20,18 @@
 plt.title("Lights at Night image warped from 'cyl' to 'ortho' projection",fontsize=12)
 print 'warp to orthographic map ...'
 
-# redisplay (same image specified) should be fast since data is cached.
-fig = plt.figure()
-m.warpimage(image='earth_lights_lrg.jpg')
+# create new figure
+fig=plt.figure()
+# define orthographic projection centered on North America.
+m = Basemap(projection='robin',lon_0=-100,resolution='l')
+m.bluemarble()
+# draw coastlines.
+m.drawcoastlines(linewidth=0.5,color='0.5')
+# 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)
+print 'warp to robinson map ...'
 
 # create new figure
 fig=plt.figure()
@@ -36,10 +45,24 @@
 m.drawmeridians(np.arange(-180,180,60),labels=[0,0,0,1],color='0.5')
 m.drawparallels(np.arange(-90,90,30),labels=[1,0,0,0],color='0.5')
 plt.title("Blue Marble image - native 'cyl' projection",fontsize=12)
-print 'plot cylindrical map (no warping needed) ...'
+print 'plot native cylindrical map (no warping needed) ...'
 
 # create new figure
 fig=plt.figure()
+# define cylindrical equidistant projection.
+m = Basemap(projection='cyl',llcrnrlon=0,llcrnrlat=-60,urcrnrlon=360,urcrnrlat=60,resolution='l')
+# plot (unwarped) rgba image.
+im = m.bluemarble()
+# draw coastlines.
+m.drawcoastlines(linewidth=0.5,color='0.5')
+# draw lat/lon grid lines.
+m.drawmeridians(np.arange(-180,180,60),labels=[0,0,0,1],color='0.5')
+m.drawparallels(np.arange(-90,90,30),labels=[1,0,0,0],color='0.5')
+plt.title("Blue Marble image - non-native 'cyl' projection",fontsize=12)
+print 'plot non-native cylindrical map (warping needed) ...'
+
+# create new figure
+fig=plt.figure()
 # define orthographic projection centered on Europe.
 m = Basemap(projection='ortho',lat_0=40,lon_0=40,resolution='l')
 # plot a gray-scale image specified from a URL.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

Showing 7 results of 7

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