SF.net SVN: matplotlib: [4528] trunk/toolkits/basemap/examples
Revision: 4528
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4528&view=rev
Author: jswhit
Date: 2007-11-30 09:32:59 -0800 (Fri, 30 Nov 2007)
Log Message:
---
color ocean areas
Modified Paths:
--
trunk/toolkits/basemap/examples/garp.py
trunk/toolkits/basemap/examples/geos_demo.py
Modified: trunk/toolkits/basemap/examples/garp.py
===
--- trunk/toolkits/basemap/examples/garp.py 2007-11-30 16:16:34 UTC (rev
4527)
+++ trunk/toolkits/basemap/examples/garp.py 2007-11-30 17:32:59 UTC (rev
4528)
@@ -32,9 +32,9 @@
# 20 degree graticule.
m.drawparallels(arange(-80,81,20))
m.drawmeridians(arange(-180,180,20))
-# draw a red dot at the center.
+# draw a black dot at the center.
xpt, ypt = m(lon_0, lat_0)
-m.plot([xpt],[ypt],'ro')
+m.plot([xpt],[ypt],'ko')
# draw the title.
title('The World According to Garp in '+location)
show()
Modified: trunk/toolkits/basemap/examples/geos_demo.py
===
--- trunk/toolkits/basemap/examples/geos_demo.py2007-11-30 16:16:34 UTC
(rev 4527)
+++ trunk/toolkits/basemap/examples/geos_demo.py2007-11-30 17:32:59 UTC
(rev 4528)
@@ -24,7 +24,8 @@
fig = figure()
m =
Basemap(projection='geos',lon_0=lon_0,satellite_height=h,rsphere=(6378137.00,6356752.3142),resolution='l')
m.drawcoastlines()
-m.fillcontinents(color='coral')
+m.drawmapboundary(fill_color='aqua')
+m.fillcontinents(color='coral',lake_color='aqua')
m.drawcountries()
# draw parallels and meridians.
m.drawparallels(arange(-90.,120.,30.))
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins
SF.net SVN: matplotlib: [4533] trunk/htdocs/backends.html.template
Revision: 4533 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4533&view=rev Author: mdboom Date: 2007-11-30 11:55:56 -0800 (Fri, 30 Nov 2007) Log Message: --- Added mathtext column to backends comparison table. Modified Paths: -- trunk/htdocs/backends.html.template Modified: trunk/htdocs/backends.html.template === --- trunk/htdocs/backends.html.template 2007-11-30 19:48:41 UTC (rev 4532) +++ trunk/htdocs/backends.html.template 2007-11-30 19:55:56 UTC (rev 4533) @@ -28,6 +28,9 @@ rotated text + mathtext + + usetex @@ -62,6 +65,9 @@ X + + X + @@ -77,6 +83,9 @@ X + X + + @@ -112,6 +121,9 @@ X + + X + @@ -124,6 +136,9 @@ ? + + + ? @@ -159,6 +174,9 @@ X + + X + @@ -174,6 +192,9 @@ + X + + @@ -210,6 +231,9 @@ X + + X + @@ -227,6 +251,9 @@ X + X + + @@ -261,6 +288,9 @@ X + + X + @@ -276,6 +306,9 @@ X + X + + @@ -307,6 +340,9 @@ X + + X + @@ -330,6 +366,9 @@ X + + X + @@ -343,6 +382,9 @@ X + X + + @@ -377,6 +419,9 @@ X + + X + @@ -406,6 +451,9 @@ + + + @@ -429,6 +477,9 @@ X + + X + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ Matplotlib-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins
SF.net SVN: matplotlib: [4530] trunk/htdocs
Revision: 4530 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4530&view=rev Author: mdboom Date: 2007-11-30 11:31:05 -0800 (Fri, 30 Nov 2007) Log Message: --- Lots of updates to bring the website inline with 0.91.1 Modified Paths: -- trunk/htdocs/backends.html.template trunk/htdocs/faq.html.template trunk/htdocs/fonts.html.template trunk/htdocs/tutorial.html.template Modified: trunk/htdocs/backends.html.template === --- trunk/htdocs/backends.html.template 2007-11-30 17:39:05 UTC (rev 4529) +++ trunk/htdocs/backends.html.template 2007-11-30 19:31:05 UTC (rev 4530) @@ -1,25 +1,475 @@ [EMAIL PROTECTED]@ [EMAIL PROTECTED]@ matplotlib backends The matplotlib core graphics routines interact with an abstract renderer and graphics context to allow device independent ouput. -Currently, output to pygtk, wxPython, Tkinter, postscript, -pdf, svg, agg (antigrain geometry) and Cairo are supported. With -not too much effort, you can port matplotlib to your favorite display; -high on my list of priorities are PDF and PIL. If you are interested -in porting to one of these platforms, please contact me! +Currently, output to pygtk, wxPython, Tkinter, postscript, pdf, svg, +agg (antigrain geometry) and Cairo are supported. With not too much +effort, you can port matplotlib to your favorite display. If you are +interested in porting to one of these platforms, please contact the +http://sourceforge.net/mailarchive/forum.php?forum_name=matplotlib-devel";>matplotlib-devel +mailing list. -For a summary of the comparative strengths and features of the various -backends, see which backend should I -use?. This page describes how to install and use each backend. - -You can choose your default backend in the matplotlibrc file. The default can be -overridden from the command line prompt. This allows most if not all -matplotlib scripts can generate output to any of the backends without -any alterations. Following the lead of the matlab print -command, the backend can be chosen from the command line with the +Comparison of backends + +The following table enumerates the capabilities of the different backends. + + + + + + + + + output formats + + + rotated text + + + usetex + + + alpha-blending + + + arbitrary clipping (polar plots) + + + images + + + + + Agg + + + png, raw + + + X + + + X + + + X + + + X + + + X + + + + + Cairo + + + pdf, + png,ps, + svg, + svgz + + + X + + + + + + + + + + + + X + + + + + CocoaAgg + + + png, + raw + + + X + + + X + + + X + + + X + + + X + + + + + Emf + + + emf + + + ? + + + ? + + + ? + + + ? + + + ? + + + + + FltkAgg + + + png, + raw + + + X + + + X + + + X + + + X + + + X + + + + + Gtk + (Gdk) + + + jpeg, + png, + raw + + + + + + + + + + + + + + + X + + + + + GtkAgg + + + jpeg, + png, + raw + + + X + + + X + + + X + + + X + + + X + + + + + GtkCairo + + + jpeg, + pdf, + png, + ps, + svg, + svgz + + + X + + + + + + + + + + + + X + + + + + Pdf + + + pdf + + + X + + + X + + + X + + + X + + + X + + + + + Ps + + + eps,ps + + + X + + + X + + + + + + + + + X + + + + + QtAgg + + + png,raw + + + X + + + X + + + X + + + X + + + X + + + + + Qt4Agg + + + png,raw + + + X + + + X + + + X + + + X + + + X + + + + + Svg + + + svg, + svgz + + + X + + + + + + X + + + + + + X + + + + + TkAgg + + + png,raw + + + X + + + X + + + X + + + X + + + X + + + + + Wx + +
SF.net SVN: matplotlib: [4527] branches/transforms/lib/matplotlib
Revision: 4527 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4527&view=rev Author: mdboom Date: 2007-11-30 08:16:34 -0800 (Fri, 30 Nov 2007) Log Message: --- Fix Cairo alpha-blending. Modified Paths: -- branches/transforms/lib/matplotlib/backend_bases.py branches/transforms/lib/matplotlib/backends/backend_cairo.py Modified: branches/transforms/lib/matplotlib/backend_bases.py === --- branches/transforms/lib/matplotlib/backend_bases.py 2007-11-30 16:08:52 UTC (rev 4526) +++ branches/transforms/lib/matplotlib/backend_bases.py 2007-11-30 16:16:34 UTC (rev 4527) @@ -27,7 +27,7 @@ The following methods *should* be implemented in the backend for optimization reasons: - + draw_markers draw_path_collection draw_quad_mesh @@ -73,7 +73,7 @@ self.draw_path(gc, marker_path, marker_trans + transforms.Affine2D().translate(x, y), rgbFace) - + def draw_path_collection(self, master_transform, cliprect, clippath, clippath_trans, paths, all_transforms, offsets, offsetTrans, facecolors, edgecolors, linewidths, @@ -126,12 +126,12 @@ else: edgecolors = facecolors linewidths = npy.array([1.0], npy.float_) - + return self.draw_path_collection( master_transform, cliprect, clippath, clippath_trans, paths, [], offsets, offsetTrans, facecolors, edgecolors, linewidths, [], [antialiased]) - + def _iter_collection_raw_paths(self, master_transform, paths, all_transforms): """ This is a helper method (along with _iter_collection) to make @@ -203,20 +203,20 @@ return if Noffsets: toffsets = offsetTrans.transform(offsets) - + gc = self.new_gc() gc.set_clip_rectangle(cliprect) if clippath is not None: clippath = transforms.TransformedPath(clippath, clippath_trans) gc.set_clip_path(clippath) - + if Nfacecolors == 0: rgbFace = None if Nedgecolors == 0: gc.set_linewidth(0.0) - + xo, yo = 0, 0 for i in xrange(N): path_id = path_ids[i % Npaths] @@ -233,7 +233,7 @@ gc.set_antialiased(antialiaseds[i % Naa]) yield xo, yo, path_id, gc, rgbFace - + def get_image_magnification(self): """ Get the factor by which to magnify images passed to draw_image. @@ -282,7 +282,7 @@ your text. """ raise NotImplementedError - + def flipy(self): """return true if y small numbers are top for renderer Is used for drawing text (text.py) and images (image.py) only @@ -334,8 +334,8 @@ def stop_rasterizing(self): pass - + class GraphicsContextBase: """An abstract base class that provides color, line styles, etc... """ @@ -380,8 +380,6 @@ Return the alpha value used for blending - not supported on all backends """ -if len(self._rgb) == 4: -return self._rgb[3] return self._alpha def get_antialiased(self): @@ -795,7 +793,7 @@ # can't delete the artist while h: print "Removing",h -if h.remove(): +if h.remove(): self.draw_idle() break parent = None @@ -804,7 +802,7 @@ parent = p break h = parent - + def onHilite(self, ev): """ Mouse event processor which highlights the artists @@ -980,7 +978,7 @@ # a) otherwise we'd have cyclical imports, since all of these # classes inherit from FigureCanvasBase # b) so we don't import a bunch of stuff the user may never use - + def print_emf(self, *args, **kwargs): from backends.backend_emf import FigureCanvasEMF # lazy import emf = self.switch_backends(FigureCanvasEMF) @@ -990,7 +988,7 @@ from backends.backend_ps import FigureCanvasPS # lazy import ps = self.switch_backends(FigureCanvasPS) return ps.print_eps(*args, **kwargs) - + def print_pdf(self, *args, **kwargs): from backends.backend_pdf import FigureCanvasPdf # lazy import pdf = self.switch_backends(FigureCanvasPdf) @@ -1000,7 +998,7 @@ from backends.backend_agg import FigureCanvasAgg # lazy import agg = self.switch_backends(FigureCanvasAgg) return agg.print_png(*args, **kwargs) - + def print_ps(self, *args, **kwargs): from backends.backend_ps import FigureCanvasPS # lazy import ps = self.switch_backends(FigureCanvasPS) @@ -1
SF.net SVN: matplotlib: [4524] branches/transforms/lib/matplotlib/ _mathtext_data.py
Revision: 4524
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4524&view=rev
Author: mdboom
Date: 2007-11-30 07:50:35 -0800 (Fri, 30 Nov 2007)
Log Message:
---
Fix bb numerals in mathtext.
Modified Paths:
--
branches/transforms/lib/matplotlib/_mathtext_data.py
Modified: branches/transforms/lib/matplotlib/_mathtext_data.py
===
--- branches/transforms/lib/matplotlib/_mathtext_data.py2007-11-30
15:50:13 UTC (rev 4523)
+++ branches/transforms/lib/matplotlib/_mathtext_data.py2007-11-30
15:50:35 UTC (rev 4524)
@@ -88,7 +88,7 @@
r'\phi' : ('cmmi10', 42),
r'\chi' : ('cmmi10', 17),
r'\psi' : ('cmmi10', 31),
-
+
r'(': ('cmr10', 119),
r'\leftparen' : ('cmr10', 119),
r'\rightparen' : ('cmr10', 68),
@@ -127,7 +127,7 @@
r'\Phi' : ('cmr10', 9),
r'\Psi' : ('cmr10', 15),
r'\Omega' : ('cmr10', 12),
-
+
# these are mathml names, I think. I'm just using them for the
# tex methods noted
r'\circumflexaccent' : ('cmr10', 124), # for \hat
@@ -398,7 +398,7 @@
r'\}' : ('pncr8a', 125),
r'\backslash' : ('pncr8a', 92),
r'\ast' : ('pncr8a', 42),
-
+
r'\circumflexaccent' : ('pncri8a', 124), # for \hat
r'\combiningbreve' : ('pncri8a', 81), # for \breve
r'\combininggraveaccent' : ('pncri8a', 114), # for \grave
@@ -2071,7 +2071,7 @@
'rightzigzagarrow': 8669,
'rightarrow': 8594,
'leftarrow': 8592,
-'__sqrt__': 8730,
+'__sqrt__': 8730,
'twoheaddownarrow': 8609,
'oint': 8750,
'bigvee': 8897,
@@ -2236,7 +2236,7 @@
'{': 123,
'}': 125,
'_': 95,
-'imath': 0x131,
+'imath': 0x131,
'circumflexaccent' : 770,
'combiningbreve' : 774,
'combiningoverline': 772,
@@ -2294,6 +2294,7 @@
],
'it':
[
+(0x0030, 0x0039, 'rm', 0x1d7d8), # 0-9
(0x0041, 0x0041, 'it', 0xe154), # A-B
(0x0043, 0x0043, 'it', 0x2102), # C (missing in beta STIX fonts)
(0x0044, 0x0044, 'it', 0x2145), # D
@@ -2469,5 +2470,5 @@
(0x0061, 0x007a, 'rm', 0x1d68a) # a-z
],
}
-
-
+
+
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins
SF.net SVN: matplotlib: [4523] branches/transforms/lib/matplotlib/backends/ backend_pdf.py
Revision: 4523
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4523&view=rev
Author: mdboom
Date: 2007-11-30 07:50:13 -0800 (Fri, 30 Nov 2007)
Log Message:
---
Cleanup some variable names.
Modified Paths:
--
branches/transforms/lib/matplotlib/backends/backend_pdf.py
Modified: branches/transforms/lib/matplotlib/backends/backend_pdf.py
===
--- branches/transforms/lib/matplotlib/backends/backend_pdf.py 2007-11-30
15:13:44 UTC (rev 4522)
+++ branches/transforms/lib/matplotlib/backends/backend_pdf.py 2007-11-30
15:50:13 UTC (rev 4523)
@@ -682,12 +682,12 @@
descriptor['MaxWidth'] = max(widths)
# Make the "Differences" array, sort the ccodes < 255 from
-# the two-byte ccodes, and build the whole set of glyph ids
+# the multi-byte ccodes, and build the whole set of glyph ids
# that we need from this font.
cmap = font.get_charmap()
glyph_ids = []
differences = []
-two_byte_chars = Set()
+multi_byte_chars = Set()
for c in characters:
ccode = ord(c)
gind = cmap.get(ccode) or 0
@@ -696,7 +696,7 @@
if ccode <= 255:
differences.append((ccode, glyph_name))
else:
-two_byte_chars.add(glyph_name)
+multi_byte_chars.add(glyph_name)
differences.sort()
last_c = -2
@@ -715,7 +715,7 @@
charprocDict = { 'Length': len(stream) }
# The 2-byte characters are used as XObjects, so they
# need extra info in their dictionary
-if charname in two_byte_chars:
+if charname in multi_byte_chars:
charprocDict['Type'] = Name('XObject')
charprocDict['Subtype'] = Name('Form')
charprocDict['BBox'] = bbox
@@ -726,9 +726,9 @@
# Send the glyphs with ccode > 255 to the XObject dictionary,
# and the others to the font itself
-if charname in two_byte_chars:
+if charname in multi_byte_chars:
name = self._get_xobject_symbol_name(filename, charname)
-self.two_byte_charprocs[name] = charprocObject
+self.multi_byte_charprocs[name] = charprocObject
else:
charprocs[charname] = charprocObject
@@ -1297,7 +1297,7 @@
self.file.output(self.encode_string(unichr(num), fonttype),
Op.show)
self.file.output(Op.end_text)
-# If using Type 3 fonts, render all of the two-byte characters
+# If using Type 3 fonts, render all of the multi-byte characters
# as XObjects using the 'Do' command.
if global_fonttype == 3:
for ox, oy, fontname, fontsize, num, symbol_name in glyphs:
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins
SF.net SVN: matplotlib: [4521] branches/transforms
Revision: 4521
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4521&view=rev
Author: mdboom
Date: 2007-11-30 07:06:56 -0800 (Fri, 30 Nov 2007)
Log Message:
---
Get Gtk backend working.
Modified Paths:
--
branches/transforms/lib/matplotlib/axis.py
branches/transforms/lib/matplotlib/backends/backend_gdk.py
branches/transforms/lib/matplotlib/path.py
branches/transforms/src/_path.cpp
Modified: branches/transforms/lib/matplotlib/axis.py
===
--- branches/transforms/lib/matplotlib/axis.py 2007-11-30 14:43:11 UTC (rev
4520)
+++ branches/transforms/lib/matplotlib/axis.py 2007-11-30 15:06:56 UTC (rev
4521)
@@ -87,7 +87,7 @@
self._size = size
self._padPixels = self.figure.dpi * self._pad * (1/72.0)
-
+
self.tick1line = self._get_tick1line()
self.tick2line = self._get_tick2line()
self.gridline = self._get_gridline()
@@ -97,7 +97,7 @@
self.label2 = self._get_text2()
self.update_position(loc)
-
+
self.gridOn = gridOn
self.tick1On = tick1On
self.tick2On = tick2On
@@ -114,7 +114,7 @@
#self.tick2line.set_clip_path(clippath, transform)
self.gridline.set_clip_path(clippath, transform)
set_clip_path.__doc__ = Artist.set_clip_path.__doc__
-
+
def contains(self, mouseevent):
"""Test whether the mouse event occured in the Tick marks.
@@ -189,7 +189,7 @@
"""
self.label1.set_text(s)
set_label = set_label1
-
+
def set_label2(self, s):
"""
Set the text of ticklabel2
@@ -209,7 +209,7 @@
def set_view_interval(self, vmin, vmax, ignore=False):
raise NotImplementedError('Derived must override')
-
+
class XTick(Tick):
"""
Contains all the Artists needed to make an x tick - the tick line,
@@ -223,7 +223,7 @@
# x in data coords, y in axes coords
#t = Text(
trans, vert, horiz =
self.axes.get_xaxis_text1_transform(self._padPixels)
-
+
t = TextWithDash(
x=0, y=0,
fontproperties=FontProperties(size=rcParams['xtick.labelsize']),
@@ -320,10 +320,10 @@
else:
Vmin, Vmax = self.get_view_interval()
self.axes.viewLim.intervalx = min(vmin, Vmin), max(vmax, Vmax)
-
+
def get_minpos(self):
return self.axes.dataLim.minposx
-
+
def get_data_interval(self):
'return the Interval instance for this axis data limits'
return self.axes.dataLim.intervalx
@@ -428,7 +428,7 @@
self._loc = loc
-
+
def get_view_interval(self):
'return the Interval instance for this axis view limits'
return self.axes.viewLim.intervaly
@@ -439,10 +439,10 @@
else:
Vmin, Vmax = self.get_view_interval()
self.axes.viewLim.intervaly = min(vmin, Vmin), max(vmax, Vmax)
-
+
def get_minpos(self):
return self.axes.dataLim.minposy
-
+
def get_data_interval(self):
'return the Interval instance for this axis data limits'
return self.axes.dataLim.intervaly
@@ -465,7 +465,7 @@
"""
LABELPAD = 5
OFFSETTEXTPAD = 3
-
+
def __str__(self):
return str(self.__class__).split('.')[-1] \
+ "(%d,%d)"%self.axes.transAxes.xy_tup((0,0))
@@ -493,23 +493,23 @@
self.majorTicks = []
self.minorTicks = []
self.pickradius = pickradius
-
+
self.cla()
self.set_scale('linear')
-
+
def get_transform(self):
return self._scale.get_transform()
def get_scale(self):
return self._scale.name
-
+
def set_scale(self, value, **kwargs):
self._scale = scale_factory(value, self, **kwargs)
self._scale.set_default_locators_and_formatters(self)
def limit_range_for_scale(self, vmin, vmax):
return self._scale.limit_range_for_scale(vmin, vmax, self.get_minpos())
-
+
def get_children(self):
children = [self.label]
majorticks = self.get_major_ticks()
@@ -547,7 +547,7 @@
self.minorTicks.extend([self._get_tick(major=False)])
self._lastNumMajorTicks = 1
self._lastNumMinorTicks = 1
-
+
self.converter = None
self.units = None
self.set_units(None)
@@ -555,17 +555,17 @@
def set_clip_path(self, clippath, transform=None):
Artist.set_clip_path(self, clippath, transform)
majorticks = self.get_major_ticks()
-minorticks = self.get_minor_ticks()
+minorticks = self.get_minor_ticks()
for child in self.majorTicks + self.minorTicks:
child.set_clip_path(clippath, transform)
-
+
def get_view_interval(self):
'return the Interval instance for this axis view limits'
raise N
SF.net SVN: matplotlib: [4520] trunk/toolkits/basemap/examples
Revision: 4520
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4520&view=rev
Author: jswhit
Date: 2007-11-30 06:43:11 -0800 (Fri, 30 Nov 2007)
Log Message:
---
remove numerix imports
Modified Paths:
--
trunk/toolkits/basemap/examples/ccsm_popgrid.py
trunk/toolkits/basemap/examples/fcstmaps.py
trunk/toolkits/basemap/examples/fillstates.py
trunk/toolkits/basemap/examples/plotmap_masked.py
trunk/toolkits/basemap/examples/plotmap_oo.py
trunk/toolkits/basemap/examples/simpletest_oo.py
Modified: trunk/toolkits/basemap/examples/ccsm_popgrid.py
===
--- trunk/toolkits/basemap/examples/ccsm_popgrid.py 2007-11-30 14:36:43 UTC
(rev 4519)
+++ trunk/toolkits/basemap/examples/ccsm_popgrid.py 2007-11-30 14:43:11 UTC
(rev 4520)
@@ -22,13 +22,8 @@
"""
import pylab as pl
from matplotlib import rcParams
-try:
-import numpy
-rcParams['numerix'] = 'numpy'
-except:
-raise ImportError('this example requires numpy')
-import matplotlib.numerix.ma as MA
-import matplotlib.numerix as N
+from numpy import ma as MA
+import numpy as N
from matplotlib.toolkits.basemap import Basemap, NetCDFFile
# read in data from netCDF file.
Modified: trunk/toolkits/basemap/examples/fcstmaps.py
===
--- trunk/toolkits/basemap/examples/fcstmaps.py 2007-11-30 14:36:43 UTC (rev
4519)
+++ trunk/toolkits/basemap/examples/fcstmaps.py 2007-11-30 14:43:11 UTC (rev
4520)
@@ -4,7 +4,7 @@
meshgrid, axes, colorbar
import numpy
import sys
-from matplotlib.numerix import ma
+from numpy import ma
import datetime
from matplotlib.toolkits.basemap import Basemap, NetCDFFile, addcyclic
Modified: trunk/toolkits/basemap/examples/fillstates.py
===
--- trunk/toolkits/basemap/examples/fillstates.py 2007-11-30 14:36:43 UTC
(rev 4519)
+++ trunk/toolkits/basemap/examples/fillstates.py 2007-11-30 14:43:11 UTC
(rev 4520)
@@ -1,5 +1,5 @@
import pylab as p
-import matplotlib.numerix as nx
+import numpy
from matplotlib.toolkits.basemap import Basemap as Basemap
from matplotlib.colors import rgb2hex
from matplotlib.patches import Polygon
@@ -90,7 +90,7 @@
poly = Polygon(seg,facecolor=color,edgecolor=color)
ax.add_patch(poly)
# draw meridians and parallels.
-m.drawparallels(nx.arange(25,65,20),labels=[1,0,0,0])
-m.drawmeridians(nx.arange(-120,-40,20),labels=[0,0,0,1])
+m.drawparallels(numpy.arange(25,65,20),labels=[1,0,0,0])
+m.drawmeridians(numpy.arange(-120,-40,20),labels=[0,0,0,1])
p.title('Filling State Polygons by Population Density')
p.show()
Modified: trunk/toolkits/basemap/examples/plotmap_masked.py
===
--- trunk/toolkits/basemap/examples/plotmap_masked.py 2007-11-30 14:36:43 UTC
(rev 4519)
+++ trunk/toolkits/basemap/examples/plotmap_masked.py 2007-11-30 14:43:11 UTC
(rev 4520)
@@ -8,7 +8,7 @@
from matplotlib.toolkits.basemap import Basemap, shiftgrid
from pylab import title, colorbar, show, axes, cm, load, arange, figure, \
text, where
-from matplotlib.numerix import ma
+from numpy import ma
import matplotlib.colors as colors
# read in topo data (on a regular lat/lon grid)
Modified: trunk/toolkits/basemap/examples/plotmap_oo.py
===
--- trunk/toolkits/basemap/examples/plotmap_oo.py 2007-11-30 14:36:43 UTC
(rev 4519)
+++ trunk/toolkits/basemap/examples/plotmap_oo.py 2007-11-30 14:43:11 UTC
(rev 4520)
@@ -14,7 +14,7 @@
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
from matplotlib.toolkits.basemap import Basemap, shiftgrid
from matplotlib.figure import Figure
-import matplotlib.numerix as NX
+import numpy
import matplotlib.cm as cm
from matplotlib.mlab import load
@@ -57,9 +57,9 @@
m.drawstates()
# draw parallels and meridians.
# label on left, right and bottom of map.
-parallels = NX.arange(0.,80,20.)
+parallels = numpy.arange(0.,80,20.)
m.drawparallels(parallels,labels=[1,1,0,1])
-meridians = NX.arange(10.,360.,30.)
+meridians = numpy.arange(10.,360.,30.)
m.drawmeridians(meridians,labels=[1,1,0,1])
# set title.
ax.set_title('ETOPO Topography - Lambert Conformal Conic')
Modified: trunk/toolkits/basemap/examples/simpletest_oo.py
===
--- trunk/toolkits/basemap/examples/simpletest_oo.py2007-11-30 14:36:43 UTC
(rev 4519)
+++ trunk/toolkits/basemap/examples/simpletest_oo.py2007-11-30 14:43:11 UTC
(rev 4520)
@@ -7,8 +7,7 @@
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
from matplotlib.toolkits.basemap import Basemap
from matplotlib.figure import Figure
-from numpy import meshgrid
-import matplotlib.numerix as nx
+i
SF.net SVN: matplotlib: [4519] trunk/toolkits/basemap/examples
Revision: 4519 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4519&view=rev Author: jswhit Date: 2007-11-30 06:36:43 -0800 (Fri, 30 Nov 2007) Log Message: --- no Float32 anymore Modified Paths: -- trunk/toolkits/basemap/examples/pnganim.py trunk/toolkits/basemap/examples/warpimage.py Modified: trunk/toolkits/basemap/examples/pnganim.py === --- trunk/toolkits/basemap/examples/pnganim.py 2007-11-30 12:58:57 UTC (rev 4518) +++ trunk/toolkits/basemap/examples/pnganim.py 2007-11-30 14:36:43 UTC (rev 4519) @@ -2,15 +2,13 @@ # as an animation using a tool like imagemagick animate, or # converted to an animate gif (using imagemagick convert). -# requires pydap module. -try: -from dap import client -except: -raise ImportError,"requires pyDAP module (version 2.1 or higher) from http://pydap.org"; -import pylab as p -from matplotlib.numerix import ma +# reads data over http - needs an active internet connection. + +import numpy +import pylab +from numpy import ma import datetime, sys, time, subprocess -from matplotlib.toolkits.basemap import Basemap, shiftgrid +from matplotlib.toolkits.basemap import Basemap, shiftgrid, NetCDFFile hrsgregstart = 13865688 # hrs from 00010101 to 15821015 in Julian calendar. # times in many datasets use mixed Gregorian/Julian calendar, datetime @@ -55,19 +53,19 @@ print URLu print URLv try: -data = client.open(URL) -datau = client.open(URLu) -datav = client.open(URLv) +data = NetCDFFile(URL) +datau = NetCDFFile(URLu) +datav = NetCDFFile(URLv) except: raise IOError, 'opendap server not providing the requested data' # read lats,lons,times. -print data.keys() -print datau.keys() -print datav.keys() -latitudes = data['lat'][:] -longitudes = data['lon'][:].tolist() -times = data['time'][:] +print data.variables.keys() +print datau.variables.keys() +print datav.variables.keys() +latitudes = data.variables['lat'][:] +longitudes = data.variables['lon'][:].tolist() +times = data.variables['time'][:] # put times in MMDDHH format. dates=[] for t in times: @@ -83,49 +81,49 @@ if ntime1 >= ntime2: raise ValueError,'date2 must be greater than date1' # get sea level pressure and 10-m wind data. -slpdata = data['presmsl'] -udata = datau['ugrdprs'] -vdata = datau['vgrdprs'] +slpdata = data.variables['presmsl'] +udata = datau.variables['ugrdprs'] +vdata = datau.variables['vgrdprs'] # mult slp by 0.01 to put in units of millibars. -slpin = 0.01*p.squeeze(slpdata[ntime1:ntime2+1,:,:]) -uin = p.squeeze(udata[ntime1:ntime2+1,0,:,:]) -vin = p.squeeze(vdata[ntime1:ntime2+1,0,:,:]) +slpin = 0.01*slpdata[ntime1:ntime2+1,:,:] +uin = udata[ntime1:ntime2+1,0,:,:] +vin = vdata[ntime1:ntime2+1,0,:,:] datelabels = dates[ntime1:ntime2+1] # add cyclic points -slp = p.zeros((slpin.shape[0],slpin.shape[1],slpin.shape[2]+1),p.Float64) +slp = numpy.zeros((slpin.shape[0],slpin.shape[1],slpin.shape[2]+1),numpy.float64) slp[:,:,0:-1] = slpin; slp[:,:,-1] = slpin[:,:,0] -u = p.zeros((uin.shape[0],uin.shape[1],uin.shape[2]+1),p.Float64) +u = numpy.zeros((uin.shape[0],uin.shape[1],uin.shape[2]+1),numpy.float64) u[:,:,0:-1] = uin; u[:,:,-1] = uin[:,:,0] -v = p.zeros((vin.shape[0],vin.shape[1],vin.shape[2]+1),p.Float64) +v = numpy.zeros((vin.shape[0],vin.shape[1],vin.shape[2]+1),numpy.float64) v[:,:,0:-1] = vin; v[:,:,-1] = vin[:,:,0] -longitudes.append(360.); longitudes = p.array(longitudes) +longitudes.append(360.); longitudes = numpy.array(longitudes) # make 2-d grid of lons, lats -lons, lats = p.meshgrid(longitudes,latitudes) +lons, lats = numpy.meshgrid(longitudes,latitudes) print 'min/max slp,u,v' -print min(p.ravel(slp)),max(p.ravel(slp)) -print min(p.ravel(uin)),max(p.ravel(uin)) -print min(p.ravel(vin)),max(p.ravel(vin)) +print slp.min(), slp.max() +print uin.min(), uin.max() +print vin.min(), vin.max() print 'dates' print datelabels -# make orthographic basemap. +# make orthographic basemapylab. m = Basemap(resolution='c',projection='ortho',lat_0=60.,lon_0=-60.) -p.ion() # interactive mode on. -uin = p.squeeze(udata[ntime1:ntime2+1,0,:,:]) -vin = p.squeeze(vdata[ntime1:ntime2+1,0,:,:]) +pylab.ion() # interactive mode on. +uin = udata[ntime1:ntime2+1,0,:,:] +vin = vdata[ntime1:ntime2+1,0,:,:] datelabels = dates[ntime1:ntime2+1] -# make orthographic basemap. +# make orthographic basemapylab. m = Basemap(resolution='c',projection='ortho',lat_0=60.,lon_0=-60.) -p.ion() # interactive mode on. +pylab.ion() # interactive mode on. # create figure, add axes (leaving room for colorbar on right) -fig = p.figure() +fig = pylab.figure() ax = fig.add_axes([0.1,0.1,0.7,0.7]) # set desired contour levels. -clevs = p.arange(960,1061,5) +clevs = numpy.arange(960,1061,5) # compute native x,y coordinates of grid. x, y = m(lons, lats) # define parallels and meridians to draw. -parallels = p.arange(-80.,90,20.) -meridians = p.ar
SF.net SVN: matplotlib: [4526] trunk/toolkits/basemap/Changelog
Revision: 4526 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4526&view=rev Author: jswhit Date: 2007-11-30 08:08:52 -0800 (Fri, 30 Nov 2007) Log Message: --- release 0.9.8 Modified Paths: -- trunk/toolkits/basemap/Changelog Modified: trunk/toolkits/basemap/Changelog === --- trunk/toolkits/basemap/Changelog2007-11-30 15:51:18 UTC (rev 4525) +++ trunk/toolkits/basemap/Changelog2007-11-30 16:08:52 UTC (rev 4526) @@ -1,4 +1,4 @@ -version 0.9.8 (not yet released) +version 0.9.8 (svn revision 4526) * fixes for filling continents in orthographic projection. * added 'maskandscale' kwarg to NetCDFFile to optionally turn off automatic masking and rescaling This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ Matplotlib-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins
SF.net SVN: matplotlib: [4522] trunk/toolkits/basemap/examples/garp.py
Revision: 4522 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4522&view=rev Author: jswhit Date: 2007-11-30 07:13:44 -0800 (Fri, 30 Nov 2007) Log Message: --- fill continents and oceans. Modified Paths: -- trunk/toolkits/basemap/examples/garp.py Modified: trunk/toolkits/basemap/examples/garp.py === --- trunk/toolkits/basemap/examples/garp.py 2007-11-30 15:06:56 UTC (rev 4521) +++ trunk/toolkits/basemap/examples/garp.py 2007-11-30 15:13:44 UTC (rev 4522) @@ -24,9 +24,11 @@ m = Basemap(width=width,height=width,\ resolution='c',projection='aeqd',\ lat_0=lat_0,lon_0=lon_0) +# fill background. +m.drawmapboundary(fill_color='aqua') # draw coasts and fill continents. m.drawcoastlines(linewidth=0.5) -m.fillcontinents() +m.fillcontinents(color='coral',lake_color='aqua') # 20 degree graticule. m.drawparallels(arange(-80,81,20)) m.drawmeridians(arange(-180,180,20)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ Matplotlib-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins
SF.net SVN: matplotlib: [4518] trunk/toolkits/basemap/lib/matplotlib/ toolkits/basemap/basemap.py
Revision: 4518
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4518&view=rev
Author: jswhit
Date: 2007-11-30 04:58:57 -0800 (Fri, 30 Nov 2007)
Log Message:
---
docstring improvements.
Modified Paths:
--
trunk/toolkits/basemap/lib/matplotlib/toolkits/basemap/basemap.py
Modified: trunk/toolkits/basemap/lib/matplotlib/toolkits/basemap/basemap.py
===
--- trunk/toolkits/basemap/lib/matplotlib/toolkits/basemap/basemap.py
2007-11-30 04:09:48 UTC (rev 4517)
+++ trunk/toolkits/basemap/lib/matplotlib/toolkits/basemap/basemap.py
2007-11-30 12:58:57 UTC (rev 4518)
@@ -1,3 +1,17 @@
+"""
+Module for plotting data on maps with matplotlib.
+
+Contains the Basemap class (which does most of the
+heavy lifting), and the following functions:
+
+NetCDFFile: Read local and remote NetCDF datasets.
+
+interp: bilinear interpolation between rectilinear grids.
+
+shiftgrid: shifts global lat/lon grids east or west.
+
+addcyclic: Add cyclic (wraparound) point in longitude.
+"""
from matplotlib import rcParams
from matplotlib import __version__ as _matplotlib_version
# check to make sure matplotlib is not too old.
@@ -87,6 +101,10 @@
_Basemap_init_doc = """
create a Basemap instance.
+ This sets up a basemap with specified map projection.
+ and creates the coastline data structures in native map projection
+ coordinates.
+
arguments:
projection - map projection. Supported projections are:
@@ -195,6 +213,39 @@
latitude circle boundinglat is tangent to the edge of the map at lon_0.
satellite_height - height of satellite (in m) above equator -
only relevant for geostationary projections ('geos').
+
+ Here are the most commonly used class methods (see the docstring
+ for each for more details):
+
+ To draw a graticule grid (labelled latitude and longitude lines)
+ use the drawparallels and drawmeridians methods.
+
+ To draw coastline, rivers and political boundaries, use the
+ the drawcontinents, drawrivers, drawcountries and drawstates methods.
+
+ To fill the continents and inland lakes, use the fillcontinents method.
+
+ To draw the boundary of the map projection region, and fill the
+ interior a certain color, use the drawmapboundary method.
+
+ The contour, contourf, pcolor, pcolormesh, plot, scatter
+ quiver and imshow methods use the corresponding matplotlib axes
+ methods to draw on the map.
+
+ The transform_scalar method can be used to interpolate regular
+ lat/lon grids of scalar data to native map projection grids.
+
+ The transform_vector method can be used to interpolate and rotate
+ regular lat/lon grids of vector data to native map projection grids.
+
+ The rotate_vector method rotates a vector field from lat/lon
+ coordinates into map projections coordinates, without doing any
+ interpolation.
+
+ The readshapefile method can be used to read in data from ESRI
+ shapefiles.
+
+ The drawgreatcircle method draws great circles on the map.
""" % locals()
# unsupported projection error message.
@@ -216,11 +267,9 @@
class Basemap(object):
"""
-Set up a basemap with specified map projection.
-Doesn't actually draw anything, but sets up the map projection class and
-creates the coastline, lake river and political boundary data
-structures in native map projection coordinates.
-Uses a pyrex interface to C-code from proj.4 (http://proj.maptools.org).
+Class for plotting data on map projections with matplotlib.
+See __init__ docstring for details on how to create a class
+instance for a given map projection.
Useful instance variables:
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins
SF.net SVN: matplotlib: [4531] trunk/htdocs/goals.txt
Revision: 4531 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4531&view=rev Author: mdboom Date: 2007-11-30 11:44:55 -0800 (Fri, 30 Nov 2007) Log Message: --- Updated some statuses on the goals page. Modified Paths: -- trunk/htdocs/goals.txt Modified: trunk/htdocs/goals.txt === --- trunk/htdocs/goals.txt 2007-11-30 19:31:05 UTC (rev 4530) +++ trunk/htdocs/goals.txt 2007-11-30 19:44:55 UTC (rev 4531) @@ -79,7 +79,10 @@ *** sqrt overlines -not started +done + +Arbitrary radicals at a number of different sizes can now be drawn. + *** add spacing commands @@ -92,14 +95,8 @@ *** embedded mathtext -not started +done -Currently a string is all mathtext or None. To get roman fonts in a -mathtext string you can use \rm. Ideally, we could embed mathtext -expressions in a regular string, ie, strings like r"Rate constant -$5\lambda$". Note if you use the text.usetex rc option, then -arbitrary TeX/LaTeX expressions can be used - ++ Regular text *** @@ -108,7 +105,7 @@ done This will allow specification of a font size relative to -an existing font rather than in absolute terms, which will +an existing font rather than in absolute terms, which will make scaling all fonts within a plot simpler. *** @@ -141,9 +138,9 @@ done -AGG support appeared in +AGG support appeared in -matplotlib-0.52, Postscript image support in +matplotlib-0.52, Postscript image support in matplotlib-0.53. See @@ -160,11 +157,11 @@ command. Note you can make other kinds of plots on polar, axes, eg scatter plots, as shown in polar_scatter.py. See polar screenshot. Some work -remains to be done on making the navigation toolbar behave sanely wih -polar plots. +href=screenshots.html#polar_demo>polar screenshot. Further +enhancements to polar plots, including rotating/zooming, are +implemented in the transforms branch. -*** +*** Shared axes done @@ -186,20 +183,21 @@ . Work on automatic labeling of contours is underway. linestyles added in matplotlib-0.72.1. polyfilled contours are planned. -*** +*** Log histogram not started *** General polygon clipping -not started +mostly done This will be based on agg's http://www.antigrain.com/demo/index.html#PAGE_DEMO_scanline_boolean>scanline boolean algebra, which does not have the licensing restrictions of the http://www.cs.man.ac.uk/aig/staff/alan/software>gpc -algorithms. +algorithms. This currently works in the Agg and Pdf backends. On the +transforms branch, it additionally works in the Cairo, Ps and Svg backends. *** 2-D vector plots @@ -245,7 +243,7 @@ *** Bezier curves, paths -not started +done on transforms branch *** 3-D visualization @@ -429,21 +427,11 @@ *** SVG backend -almost done +almost done Jared Wahlstrand wrote the SVG backend. As of matplotlib-0.61 svg has fast -rendering, good layout, image support and font support. Remaining is -mathtext for svg. +href="whats_new.html#0.61-svg_fixes">matplotlib-0.91 svg has fast +rendering, good layout, image support, font support and mathtext +support. Support for clipping paths is available on the transforms +branch. -*** -Paint clipping problems - -very low priority - -The problem resides in the underlying libart package (which -sees little maintenance). -*** -GD color allocation - -very low priority This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ Matplotlib-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins
SF.net SVN: matplotlib: [4525] branches/transforms/lib/matplotlib/patches. py
Revision: 4525
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4525&view=rev
Author: mdboom
Date: 2007-11-30 07:51:18 -0800 (Fri, 30 Nov 2007)
Log Message:
---
Fix shadows (see pie_demo.py)
Modified Paths:
--
branches/transforms/lib/matplotlib/patches.py
Modified: branches/transforms/lib/matplotlib/patches.py
===
--- branches/transforms/lib/matplotlib/patches.py 2007-11-30 15:50:35 UTC
(rev 4524)
+++ branches/transforms/lib/matplotlib/patches.py 2007-11-30 15:51:18 UTC
(rev 4525)
@@ -71,7 +71,7 @@
self._hatch = hatch
self._combined_transform = transforms.IdentityTransform()
self.fill = fill
-
+
if len(kwargs): artist.setp(self, **kwargs)
__init__.__doc__ = cbook.dedent(__init__.__doc__) % artist.kwdocd
@@ -105,7 +105,7 @@
def get_extents(self):
return self.get_path().get_extents(self.get_transform())
-
+
def get_transform(self):
return self._combined_transform
@@ -116,10 +116,10 @@
def get_data_transform(self):
return artist.Artist.get_transform(self)
-
+
def get_patch_transform(self):
return transforms.IdentityTransform()
-
+
def get_antialiased(self):
return self._antialiased
@@ -155,7 +155,7 @@
ACCEPTS: any matplotlib color
"""
self._facecolor = color
-
+
def set_linewidth(self, w):
"""
Set the patch linewidth in points
@@ -212,7 +212,7 @@
if cbook.is_string_like(self._edgecolor) and
self._edgecolor.lower()=='none':
gc.set_linewidth(0)
-else:
+else:
gc.set_foreground(self._edgecolor)
gc.set_linewidth(self._linewidth)
@@ -226,7 +226,7 @@
rgbFace = None
else:
rgbFace = colors.colorConverter.to_rgb(self._facecolor)
-
+
if self._hatch:
gc.set_hatch(self._hatch )
@@ -234,7 +234,7 @@
transform = self.get_transform()
tpath = transform.transform_path_non_affine(path)
affine = transform.get_affine()
-
+
renderer.draw_path(gc, tpath, affine, rgbFace)
#renderer.close_group('patch')
@@ -322,25 +322,25 @@
def _update_transform(self):
self._shadow_transform = transforms.Affine2D().translate(self._ox,
self._oy)
-
+
def _get_ox(self):
return self._ox
def _set_ox(self, ox):
self._ox = ox
self._update_transform()
-
+
def _get_oy(self):
return self._oy
def _set_oy(self, oy):
self._oy = oy
self._update_transform()
-
+
def get_path(self):
return self.patch.get_path()
def get_patch_transform(self):
- return self._shadow_transform
-
+ return self.patch.get_patch_transform() + self._shadow_transform
+
class Rectangle(Patch):
"""
Draw a rectangle with lower left at xy=(x,y) with specified
@@ -385,7 +385,7 @@
x, y = self.get_transform().inverted().transform_point(
(mouseevent.x, mouseevent.y))
return (x >= 0.0 and x <= 1.0 and y >= 0.0 and y <= 1.0), {}
-
+
def get_x(self):
"Return the left coord of the rectangle"
return self._bbox.x0
@@ -480,9 +480,9 @@
self._path = Path.unit_regular_polygon(numVertices)
self._poly_transform = transforms.Affine2D()
self._update_transform()
-
+
Patch.__init__(self, **kwargs)
-
+
__init__.__doc__ = cbook.dedent(__init__.__doc__) % artist.kwdocd
def _update_transform(self):
@@ -504,7 +504,7 @@
self._orientation = xy
self._update_transform()
orientation = property(_get_orientation, _set_orientation)
-
+
def _get_radius(self):
return self._radius
def _set_radius(self, xy):
@@ -518,13 +518,13 @@
self._numVertices = numVertices
self._path = Path.unit_regular_polygon(numVertices)
numvertices = property(_get_numvertices, _set_numvertices)
-
+
def get_path(self):
return self._path
def get_patch_transform(self):
return self._poly_transform
-
+
class PathPatch(Patch):
"""
A general polycurve path patch.
@@ -535,7 +535,7 @@
def __init__(self, path, **kwargs):
"""
path is a Path object
-
+
Valid kwargs are:
%(Patch)s
See Patch documentation for additional kwargs
@@ -574,7 +574,7 @@
def _set_xy(self, vertices):
self._path = Path(vertices)
xy = property(_get_xy, _set_xy)
-
+
class Wedge(Patch):
def __str__(self):
return "Wedge(%g,%g)"%self.xy[0]
@@ -612,7 +612,7 @@
[ 0.8, -0.1 ], [ 0.8, -0.3],
[ 1.0, 0.0 ], [ 0.8, 0.3],
[ 0.8, 0.1 ], [ 0.0, 0.1] ] )
-
SF.net SVN: matplotlib: [4529] trunk/toolkits/basemap/examples/setwh.py
Revision: 4529 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4529&view=rev Author: jswhit Date: 2007-11-30 09:39:05 -0800 (Fri, 30 Nov 2007) Log Message: --- make plot smaller so it fits onscreen Modified Paths: -- trunk/toolkits/basemap/examples/setwh.py Modified: trunk/toolkits/basemap/examples/setwh.py === --- trunk/toolkits/basemap/examples/setwh.py2007-11-30 17:32:59 UTC (rev 4528) +++ trunk/toolkits/basemap/examples/setwh.py2007-11-30 17:39:05 UTC (rev 4529) @@ -17,7 +17,7 @@ npanel = 0 # plots of the US. projs = ['lcc','aeqd','aea','laea','eqdc','stere'] -fig = figure(figsize=(8,12)) +fig = figure(figsize=(7,7)) for proj in projs: m = Basemap(width=width,height=height, resolution='c',projection=proj,\ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ Matplotlib-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins
SF.net SVN: matplotlib: [4532] trunk/matplotlib/examples/text_themes.py
Revision: 4532
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4532&view=rev
Author: mdboom
Date: 2007-11-30 11:48:41 -0800 (Fri, 30 Nov 2007)
Log Message:
---
Fix mathtext in example.
Modified Paths:
--
trunk/matplotlib/examples/text_themes.py
Modified: trunk/matplotlib/examples/text_themes.py
===
--- trunk/matplotlib/examples/text_themes.py2007-11-30 19:44:55 UTC (rev
4531)
+++ trunk/matplotlib/examples/text_themes.py2007-11-30 19:48:41 UTC (rev
4532)
@@ -17,7 +17,7 @@
plot(t1, f(t1), 'bo', t2, f(t2), 'k')
title('Damped exponential decay', font, size='large', color='r')
-text(2, 0.65, 'cos(2 pi t) exp(-t)', font, color='k', family='monospace' )
+text(2, 0.65, r'$\cos(2 \pi t) \exp(-t)$', color='k')
xlabel('time (s)', font, style='italic')
ylabel('voltage (mV)', font)
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins
SF.net SVN: matplotlib: [4534] trunk/htdocs/whats_new.html.template
Revision: 4534
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4534&view=rev
Author: mdboom
Date: 2007-11-30 12:06:59 -0800 (Fri, 30 Nov 2007)
Log Message:
---
Minor spelling corrections.
Modified Paths:
--
trunk/htdocs/whats_new.html.template
Modified: trunk/htdocs/whats_new.html.template
===
--- trunk/htdocs/whats_new.html.template2007-11-30 19:55:56 UTC (rev
4533)
+++ trunk/htdocs/whats_new.html.template2007-11-30 20:06:59 UTC (rev
4534)
@@ -7,8 +7,8 @@
versioninfo['0.91.0'] = (
('enhanced mathtext', """Complete revamp of matplotlib's internal math layout
and rendering
-engine. Michael Droetboom has improved the TeX parser to
-significantly expand it's coverege, and implemeted Knuth's box layout
+engine. Michael Droettboom has improved the TeX parser to
+significantly expand it's coverage, and implemented Knuth's box layout
algorithms. Additionally, the much anticipated http://www.stixfonts.org/>STIX fonts for math expressions
have come online and ship with matplotlib. See a sample of the new mathtext
at matplotlib.mlab. See
for example, loadrec.py
"""),
-('pyplot', """Added a module matplotlib.pyplot which has all of pylab's
plotting functions (eg figure, plot, show, close) but does not import the numpy
namepace. This is useful for those who want to use the pylab functionality w/o
the namespace clutter.
+('pyplot', """Added a module matplotlib.pyplot which has all of pylab's
plotting functions (eg figure, plot, show, close) but does not import the numpy
namespace. This is useful for those who want to use the pylab functionality
w/o the namespace clutter.
"""),
('maskedarray', """Added optional support for the scipy sandbox masked array
packaged. Configurable with an rc setting.
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins
