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
|
|
From: <jd...@us...> - 2008-06-09 17:49:15
|
Revision: 5437
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5437&view=rev
Author: jdh2358
Date: 2008-06-09 10:47:43 -0700 (Mon, 09 Jun 2008)
Log Message:
-----------
added date index plot faq
Modified Paths:
--------------
trunk/matplotlib/doc/devel/outline.rst
trunk/matplotlib/doc/faq/howto_faq.rst
trunk/matplotlib/doc/make.py
Modified: trunk/matplotlib/doc/devel/outline.rst
===================================================================
--- trunk/matplotlib/doc/devel/outline.rst 2008-06-09 17:47:32 UTC (rev 5436)
+++ trunk/matplotlib/doc/devel/outline.rst 2008-06-09 17:47:43 UTC (rev 5437)
@@ -22,7 +22,7 @@
date plots John has author ?
working with data John has author Darren
custom ticking ? no author ?
-masked data Eric has author ?
+masked data Eric has author ?
text ? no author ?
patches ? no author ?
legends ? no author ?
Modified: trunk/matplotlib/doc/faq/howto_faq.rst
===================================================================
--- trunk/matplotlib/doc/faq/howto_faq.rst 2008-06-09 17:47:32 UTC (rev 5436)
+++ trunk/matplotlib/doc/faq/howto_faq.rst 2008-06-09 17:47:43 UTC (rev 5437)
@@ -91,3 +91,41 @@
----------------------------------
TODO
+
+
+.. _date-index-plots:
+
+How do I skip dates where there is no data?
+===========================================
+
+When plotting time series, eg financial time series, one often wants
+to leave out days on which there is no data, eg weekends. By passing
+in dates on the x-xaxis, you get large horizontal gaps on periods when
+there is not data. The solution is to pass in some proxy x-data, eg
+evenly sampled indicies, and then use a custom formatter to format
+these as dates. The example below shows how to use an 'index formatter'
+to achieve the desired plot
+
+ import numpy as np
+ import matplotlib.pyplot as plt
+ import matplotlib.mlab as mlab
+ import matplotlib.ticker as ticker
+
+ r = mlab.csv2rec('../data/aapl.csv')
+ r.sort()
+ r = r[-30:] # get the last 30 days
+
+ N = len(r)
+ ind = np.arange(N) # the evenly spaced plot indices
+
+ def format_date(x, pos=None):
+ thisind = np.clip(int(x+0.5), 0, N-1)
+ return r.date[thisind].strftime('%Y-%m-%d')
+
+ fig = plt.figure()
+ ax = fig.add_subplot(111)
+ ax.plot(ind, r.adj_close, 'o-')
+ ax.xaxis.set_major_formatter(ticker.FuncFormatter(format_date))
+ fig.autofmt_xdate()
+
+ plt.show()
Modified: trunk/matplotlib/doc/make.py
===================================================================
--- trunk/matplotlib/doc/make.py 2008-06-09 17:47:32 UTC (rev 5436)
+++ trunk/matplotlib/doc/make.py 2008-06-09 17:47:43 UTC (rev 5437)
@@ -14,6 +14,10 @@
except OSError:
pass
+def sf():
+ 'push a copy to the sf site'
+ os.system('cd build; rsync -avz html jd...@ma...:/home/groups/m/ma/matplotlib/htdocs/doc/ -essh')
+
def figs():
os.system('cd users/figures/ && python make.py')
@@ -56,6 +60,7 @@
'html':html,
'latex':latex,
'clean':clean,
+ 'sf':sf,
'all':all,
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ef...@us...> - 2008-06-09 17:14:42
|
Revision: 5435
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5435&view=rev
Author: efiring
Date: 2008-06-09 10:13:29 -0700 (Mon, 09 Jun 2008)
Log Message:
-----------
Try again to make temporary fix for backend case-sensitivity
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/__init__.py
trunk/matplotlib/lib/matplotlib/backends/__init__.py
trunk/matplotlib/lib/matplotlib/pyplot.py
Modified: trunk/matplotlib/lib/matplotlib/__init__.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/__init__.py 2008-06-09 17:07:33 UTC (rev 5434)
+++ trunk/matplotlib/lib/matplotlib/__init__.py 2008-06-09 17:13:29 UTC (rev 5435)
@@ -772,7 +772,10 @@
rcParams['cairo.format'] = validate_cairo_format(be_parts[1])
def get_backend():
- return rcParams['backend'].lower()
+ # Validation is needed because the rcParams entry might have
+ # been set directly rather than via "use()".
+ return validate_backend(rcParams['backend'])
+ #return rcParams['backend'].lower()
def interactive(b):
"""
Modified: trunk/matplotlib/lib/matplotlib/backends/__init__.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/__init__.py 2008-06-09 17:07:33 UTC (rev 5434)
+++ trunk/matplotlib/lib/matplotlib/backends/__init__.py 2008-06-09 17:13:29 UTC (rev 5435)
@@ -1,19 +1,21 @@
import matplotlib
from matplotlib.rcsetup import interactive_bk
+from matplotlib.rcsetup import non_interactive_bk
+from matplotlib.rcsetup import all_backends
from matplotlib.rcsetup import validate_backend
__all__ = ['backend','show','draw_if_interactive',
'new_figure_manager', 'backend_version']
-backend = matplotlib.get_backend() # makes sure it is lower case
-validate_backend(backend)
+backend = matplotlib.get_backend() # validates, to match all_backends
def pylab_setup():
'return new_figure_manager, draw_if_interactive and show for pylab'
# Import the requested backend into a generic module object
backend_name = 'backend_'+backend
+ backend_name = backend_name.lower() # until we banish mixed case
backend_mod = __import__('matplotlib.backends.'+backend_name,
globals(),locals(),[backend_name])
@@ -36,7 +38,7 @@
# Additional imports which only happen for certain backends. This section
# should probably disappear once all backends are uniform.
- if backend in ['wx','wxagg']:
+ if backend.lower() in ['wx','wxagg']:
Toolbar = backend_mod.Toolbar
__all__.append('Toolbar')
Modified: trunk/matplotlib/lib/matplotlib/pyplot.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/pyplot.py 2008-06-09 17:07:33 UTC (rev 5434)
+++ trunk/matplotlib/lib/matplotlib/pyplot.py 2008-06-09 17:13:29 UTC (rev 5435)
@@ -185,7 +185,7 @@
figManager = _pylab_helpers.Gcf.get_fig_manager(num)
if figManager is None:
- if get_backend()=='PS': dpi = 72
+ if get_backend().lower() == 'ps': dpi = 72
figManager = new_figure_manager(num, figsize=figsize,
dpi=dpi,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ds...@us...> - 2008-06-09 17:09:03
|
Revision: 5434
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5434&view=rev
Author: dsdale
Date: 2008-06-09 10:07:33 -0700 (Mon, 09 Jun 2008)
Log Message:
-----------
fixed a doc error in patches
Modified Paths:
--------------
trunk/matplotlib/doc/faq/environment_variables_faq.rst
trunk/matplotlib/lib/matplotlib/patches.py
trunk/matplotlib/lib/matplotlib/pyplot.py
Added Paths:
-----------
trunk/matplotlib/doc/api/axes_api.rst
Added: trunk/matplotlib/doc/api/axes_api.rst
===================================================================
--- trunk/matplotlib/doc/api/axes_api.rst (rev 0)
+++ trunk/matplotlib/doc/api/axes_api.rst 2008-06-09 17:07:33 UTC (rev 5434)
@@ -0,0 +1,11 @@
+***************
+matplotlib axes
+***************
+
+
+:mod:`matplotlib.axes`
+======================
+
+.. automodule:: matplotlib.axes
+ :members:
+ :undoc-members:
Modified: trunk/matplotlib/doc/faq/environment_variables_faq.rst
===================================================================
--- trunk/matplotlib/doc/faq/environment_variables_faq.rst 2008-06-09 17:00:08 UTC (rev 5433)
+++ trunk/matplotlib/doc/faq/environment_variables_faq.rst 2008-06-09 17:07:33 UTC (rev 5434)
@@ -4,12 +4,15 @@
Environment Variables
*********************
-.. envvar:: PATH:
- The list of directories searched to find executable programs
-.. envvar:: PYTHONPATH:
- The list of directories that is searched to find Python packages and modules
+.. envvar:: PATH
+ The list of directories searched to find executable programs
+.. envvar:: PYTHONPATH
+
+ The list of directories that is searched to find Python packages and modules
+
+
Setting Environment Variables
=============================
Modified: trunk/matplotlib/lib/matplotlib/patches.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/patches.py 2008-06-09 17:00:08 UTC (rev 5433)
+++ trunk/matplotlib/lib/matplotlib/patches.py 2008-06-09 17:07:33 UTC (rev 5434)
@@ -13,7 +13,8 @@
# these are not available for the object inspector until after the
# class is built so we define an initial set here for the init
# function and they will be overridden after object definition
-artist.kwdocd['Patch'] = """\
+artist.kwdocd['Patch'] = """
+
================= ==============================================
Property Description
================= ==============================================
@@ -36,6 +37,7 @@
================= ==============================================
"""
+
class Patch(artist.Artist):
"""
A patch is a 2D thingy with a face color and an edge color
Modified: trunk/matplotlib/lib/matplotlib/pyplot.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/pyplot.py 2008-06-09 17:00:08 UTC (rev 5433)
+++ trunk/matplotlib/lib/matplotlib/pyplot.py 2008-06-09 17:07:33 UTC (rev 5434)
@@ -424,7 +424,6 @@
* examples/axes_demo.py places custom axes.
* examples/shared_axis_demo.py uses sharex and sharey
-
"""
nargs = len(args)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2008-06-09 17:01:21
|
Revision: 5433
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5433&view=rev
Author: jdh2358
Date: 2008-06-09 10:00:08 -0700 (Mon, 09 Jun 2008)
Log Message:
-----------
applied gregors agg resample patch
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/doc/api/artist_api.rst
trunk/matplotlib/lib/matplotlib/axes.py
trunk/matplotlib/lib/matplotlib/image.py
trunk/matplotlib/lib/matplotlib/mlab.py
trunk/matplotlib/lib/matplotlib/patches.py
trunk/matplotlib/lib/matplotlib/rcsetup.py
trunk/matplotlib/src/_image.cpp
trunk/matplotlib/src/_image.h
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2008-06-09 16:48:50 UTC (rev 5432)
+++ trunk/matplotlib/CHANGELOG 2008-06-09 17:00:08 UTC (rev 5433)
@@ -1,3 +1,7 @@
+2008-06-09 Committed Gregor's image resample patch to downsampling
+ images with new rcparam image.resample - JDH
+
+
2008-06-09 Don't install Enthought.Traits along with matplotlib. For
matplotlib developers convenience, it can still be
installed by setting an option in setup.cfg while we figure
@@ -3,4 +7,5 @@
decide if there is a future for the traited config - DSD
+
2008-06-09 Added range keyword arg to hist() - MM
Modified: trunk/matplotlib/doc/api/artist_api.rst
===================================================================
--- trunk/matplotlib/doc/api/artist_api.rst 2008-06-09 16:48:50 UTC (rev 5432)
+++ trunk/matplotlib/doc/api/artist_api.rst 2008-06-09 17:00:08 UTC (rev 5433)
@@ -1,6 +1,6 @@
-******************
+*******************
matplotlib artists
-******************
+*******************
:mod:`matplotlib.artist`
=============================
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py 2008-06-09 16:48:50 UTC (rev 5432)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2008-06-09 17:00:08 UTC (rev 5433)
@@ -4974,7 +4974,7 @@
def imshow(self, X, cmap=None, norm=None, aspect=None,
interpolation=None, alpha=1.0, vmin=None, vmax=None,
origin=None, extent=None, shape=None, filternorm=1,
- filterrad=4.0, imlim=None, **kwargs):
+ filterrad=4.0, imlim=None, resample=None, **kwargs):
"""
call signature::
@@ -5061,7 +5061,7 @@
self.set_aspect(aspect)
im = mimage.AxesImage(self, cmap, norm, interpolation, origin, extent,
filternorm=filternorm,
- filterrad=filterrad, **kwargs)
+ filterrad=filterrad, resample=resample, **kwargs)
im.set_data(X)
im.set_alpha(alpha)
@@ -5666,9 +5666,13 @@
Keyword arguments:
bins:
+
either an integer number of bins or a sequence giving the
- bins. x are the data to be binned. x can be an array or a 2D
- array with multiple data in its columns.
+ bins. x are the data to be binned. x can be an array or a
+ 2D array with multiple data in its columns. Note, if bins
+ is an integer input argument=numbins, numbins+1 bin edges
+ will be returned, compatabile with the semantics of
+ np.histogram with the new=True argument.
range:
The lower and upper range of the bins. Lower and upper outliers
@@ -5726,6 +5730,45 @@
kwargs are used to update the properties of the
hist Rectangles:
%(Rectangle)s
+
+
+ Here is an example which generates a histogram of normally
+ distributed random numbers and plot the analytic PDF over it::
+
+
+ import numpy as np
+ import matplotlib.pyplot as plt
+ import matplotlib.mlab as mlab
+
+ mu, sigma = 100, 15
+ x = mu + sigma * np.random.randn(10000)
+
+ fig = plt.figure()
+ ax = fig.add_subplot(111)
+
+ # the histogram of the data
+ n, bins, patches = ax.hist(x, 50, normed=1, facecolor='green', alpha=0.75)
+
+ # hist uses np.histogram under the hood to create 'n' and 'bins'.
+ # np.histogram returns the bin edges, so there will be 50 probability
+ # density values in n, 51 bin edges in bins and 50 patches. To get
+ # everything lined up, we'll compute the bin centers
+ bincenters = 0.5*(bins[1:]+bins[:-1])
+
+ # add a 'best fit' line for the normal PDF
+ y = mlab.normpdf( bincenters, mu, sigma)
+ l = ax.plot(bincenters, y, 'r--', linewidth=1)
+
+ ax.set_xlabel('Smarts')
+ ax.set_ylabel('Probability')
+ ax.set_title(r'$\mathrm{Histogram\ of\ IQ:}\ \mu=100,\ \sigma=15$')
+ ax.set_xlim(40, 160)
+ ax.set_ylim(0, 0.03)
+ ax.grid(True)
+
+ #fig.savefig('histogram_demo',dpi=72)
+ plt.show()
+
"""
if not self._hold: self.cla()
Modified: trunk/matplotlib/lib/matplotlib/image.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/image.py 2008-06-09 16:48:50 UTC (rev 5432)
+++ trunk/matplotlib/lib/matplotlib/image.py 2008-06-09 17:00:08 UTC (rev 5433)
@@ -57,6 +57,7 @@
extent=None,
filternorm=1,
filterrad=4.0,
+ resample = False,
**kwargs
):
@@ -86,6 +87,7 @@
self.set_interpolation(interpolation)
+ self.set_resample(resample)
self.axes = ax
@@ -200,6 +202,7 @@
im.set_interpolation(self._interpd[self._interpolation])
+ im.set_resample(self._resample)
# the viewport translation
tx = (xmin-self.axes.viewLim.x0)/dxintv * numcols
@@ -325,6 +328,13 @@
raise ValueError('Illegal interpolation string')
self._interpolation = s
+ def set_resample(self, v):
+ if v is None: v = rcParams['image.resample']
+ self._resample = v
+
+ def get_interpolation(self):
+ return self._resample
+
def get_extent(self):
'get the image extent: left, right, bottom, top'
if self._extent is not None:
Modified: trunk/matplotlib/lib/matplotlib/mlab.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/mlab.py 2008-06-09 16:48:50 UTC (rev 5432)
+++ trunk/matplotlib/lib/matplotlib/mlab.py 2008-06-09 17:00:08 UTC (rev 5433)
@@ -716,7 +716,7 @@
def normpdf(x, *args):
"Return the normal pdf evaluated at x; args provides mu, sigma"
mu, sigma = args
- return 1/(np.sqrt(2*np.pi)*sigma)*np.exp(-0.5 * (1/sigma*(x - mu))**2)
+ return 1./(np.sqrt(2*np.pi)*sigma)*np.exp(-0.5 * (1./sigma*(x - mu))**2)
def levypdf(x, gamma, alpha):
Modified: trunk/matplotlib/lib/matplotlib/patches.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/patches.py 2008-06-09 16:48:50 UTC (rev 5432)
+++ trunk/matplotlib/lib/matplotlib/patches.py 2008-06-09 17:00:08 UTC (rev 5433)
@@ -34,6 +34,7 @@
visible [True | False]
zorder any number
================= ==============================================
+
"""
class Patch(artist.Artist):
"""
Modified: trunk/matplotlib/lib/matplotlib/rcsetup.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/rcsetup.py 2008-06-09 16:48:50 UTC (rev 5432)
+++ trunk/matplotlib/lib/matplotlib/rcsetup.py 2008-06-09 17:00:08 UTC (rev 5433)
@@ -379,6 +379,7 @@
'image.cmap' : ['jet', str], # one of gray, jet, etc
'image.lut' : [256, validate_int], # lookup table
'image.origin' : ['upper', str], # lookup table
+ 'image.resample' : [False, validate_bool],
'contour.negative_linestyle' : ['dashed', validate_negative_linestyle_legacy],
Modified: trunk/matplotlib/src/_image.cpp
===================================================================
--- trunk/matplotlib/src/_image.cpp 2008-06-09 16:48:50 UTC (rev 5432)
+++ trunk/matplotlib/src/_image.cpp 2008-06-09 17:00:08 UTC (rev 5433)
@@ -426,11 +426,22 @@
case HAMMING: filter.calculate(agg::image_filter_hamming(), norm); break;
case HERMITE: filter.calculate(agg::image_filter_hermite(), norm); break;
}
- typedef agg::span_image_filter_rgba_2x2<img_accessor_type, interpolator_type> span_gen_type;
- typedef agg::renderer_scanline_aa<renderer_base, span_alloc_type, span_gen_type> renderer_type;
- span_gen_type sg(ia, interpolator, filter);
- renderer_type ri(rb, sa, sg);
- agg::render_scanlines(ras, sl, ri);
+ if (resample)
+ {
+ typedef agg::span_image_resample_rgba_affine<img_accessor_type> span_gen_type;
+ typedef agg::renderer_scanline_aa<renderer_base, span_alloc_type, span_gen_type> renderer_type;
+ span_gen_type sg(ia, interpolator, filter);
+ renderer_type ri(rb, sa, sg);
+ agg::render_scanlines(ras, sl, ri);
+ }
+ else
+ {
+ typedef agg::span_image_filter_rgba_2x2<img_accessor_type, interpolator_type> span_gen_type;
+ typedef agg::renderer_scanline_aa<renderer_base, span_alloc_type, span_gen_type> renderer_type;
+ span_gen_type sg(ia, interpolator, filter);
+ renderer_type ri(rb, sa, sg);
+ agg::render_scanlines(ras, sl, ri);
+ }
}
break;
case BILINEAR:
@@ -464,11 +475,22 @@
case LANCZOS: filter.calculate(agg::image_filter_lanczos(radius), norm); break;
case BLACKMAN: filter.calculate(agg::image_filter_blackman(radius), norm); break;
}
- typedef agg::span_image_filter_rgba<img_accessor_type, interpolator_type> span_gen_type;
- typedef agg::renderer_scanline_aa<renderer_base, span_alloc_type, span_gen_type> renderer_type;
- span_gen_type sg(ia, interpolator, filter);
- renderer_type ri(rb, sa, sg);
- agg::render_scanlines(ras, sl, ri);
+ if (resample)
+ {
+ typedef agg::span_image_resample_rgba_affine<img_accessor_type> span_gen_type;
+ typedef agg::renderer_scanline_aa<renderer_base, span_alloc_type, span_gen_type> renderer_type;
+ span_gen_type sg(ia, interpolator, filter);
+ renderer_type ri(rb, sa, sg);
+ agg::render_scanlines(ras, sl, ri);
+ }
+ else
+ {
+ typedef agg::span_image_filter_rgba<img_accessor_type, interpolator_type> span_gen_type;
+ typedef agg::renderer_scanline_aa<renderer_base, span_alloc_type, span_gen_type> renderer_type;
+ span_gen_type sg(ia, interpolator, filter);
+ renderer_type ri(rb, sa, sg);
+ agg::render_scanlines(ras, sl, ri);
+ }
}
break;
@@ -530,6 +552,20 @@
}
+char Image::get_resample__doc__[] =
+"get_resample()\n"
+"\n"
+"Get the resample flag."
+;
+
+Py::Object
+Image::get_resample(const Py::Tuple& args) {
+ _VERBOSE("Image::get_resample");
+
+ args.verify_length(0);
+ return Py::Int((int)resample);
+}
+
char Image::get_size_out__doc__[] =
"numrows, numcols = get_size()\n"
"\n"
@@ -593,6 +629,21 @@
}
+char Image::set_resample__doc__[] =
+"set_resample(boolean)\n"
+"\n"
+"Set the resample flag."
+;
+
+Py::Object
+Image::set_resample(const Py::Tuple& args) {
+ _VERBOSE("Image::set_resample");
+ args.verify_length(1);
+ int flag = Py::Int(args[0]);
+ resample = (bool)flag;
+ return Py::Object();
+}
+
static void write_png_data(png_structp png_ptr, png_bytep data, png_size_t length) {
PyObject* py_file_obj = (PyObject*)png_get_io_ptr(png_ptr);
PyObject* write_method = PyObject_GetAttrString(py_file_obj, "write");
@@ -752,12 +803,14 @@
add_varargs_method( "buffer_rgba", &Image::buffer_rgba, Image::buffer_rgba__doc__);
add_varargs_method( "get_aspect", &Image::get_aspect, Image::get_aspect__doc__);
add_varargs_method( "get_interpolation", &Image::get_interpolation, Image::get_interpolation__doc__);
+ add_varargs_method( "get_resample", &Image::get_resample, Image::get_resample__doc__);
add_varargs_method( "get_size", &Image::get_size, Image::get_size__doc__);
add_varargs_method( "get_size_out", &Image::get_size_out, Image::get_size_out__doc__);
add_varargs_method( "reset_matrix", &Image::reset_matrix, Image::reset_matrix__doc__);
add_varargs_method( "get_matrix", &Image::get_matrix, Image::get_matrix__doc__);
add_keyword_method( "resize", &Image::resize, Image::resize__doc__);
add_varargs_method( "set_interpolation", &Image::set_interpolation, Image::set_interpolation__doc__);
+ add_varargs_method( "set_resample", &Image::set_resample, Image::set_resample__doc__);
add_varargs_method( "set_aspect", &Image::set_aspect, Image::set_aspect__doc__);
add_varargs_method( "write_png", &Image::write_png, Image::write_png__doc__);
add_varargs_method( "set_bg", &Image::set_bg, Image::set_bg__doc__);
Modified: trunk/matplotlib/src/_image.h
===================================================================
--- trunk/matplotlib/src/_image.h 2008-06-09 16:48:50 UTC (rev 5432)
+++ trunk/matplotlib/src/_image.h 2008-06-09 17:00:08 UTC (rev 5433)
@@ -42,6 +42,8 @@
Py::Object set_bg(const Py::Tuple& args);
Py::Object flipud_out(const Py::Tuple& args);
Py::Object flipud_in(const Py::Tuple& args);
+ Py::Object set_resample(const Py::Tuple& args);
+ Py::Object get_resample(const Py::Tuple& args);
std::pair<agg::int8u*, bool> _get_output_buffer();
@@ -78,6 +80,7 @@
unsigned interpolation, aspect;
agg::rgba bg;
+ bool resample;
private:
Py::Dict __dict__;
agg::trans_affine srcMatrix, imageMatrix;
@@ -101,6 +104,8 @@
static char set_bg__doc__[];
static char flipud_out__doc__[];
static char flipud_in__doc__[];
+ static char get_resample__doc__[];
+ static char set_resample__doc__[];
};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2008-06-09 16:50:53
|
Revision: 5432
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5432&view=rev
Author: jdh2358
Date: 2008-06-09 09:48:50 -0700 (Mon, 09 Jun 2008)
Log Message:
-----------
update mathtext on review and added notes to the outline
Modified Paths:
--------------
trunk/matplotlib/doc/devel/outline.rst
trunk/matplotlib/doc/users/mathtext.rst
trunk/matplotlib/doc/users/usetex.rst
Modified: trunk/matplotlib/doc/devel/outline.rst
===================================================================
--- trunk/matplotlib/doc/devel/outline.rst 2008-06-09 15:58:45 UTC (rev 5431)
+++ trunk/matplotlib/doc/devel/outline.rst 2008-06-09 16:48:50 UTC (rev 5432)
@@ -28,7 +28,7 @@
legends ? no author ?
animation John has author ?
collections ? no author ?
-mathtext Michael ? submitted John
+mathtext Michael in review John
fonts et al Michael ? no author Darren
pyplot tut John submitted Eric
usetex Darren submitted ?
@@ -95,3 +95,28 @@
to be an expert in the subject you are editing -- you should know
something about it and be willing to read, test, give feedback and
pester!
+
+Reviewer notes
+==============
+
+If you want to make notes for the authorwhen you have reviewed a
+submission, you can put them here. As the author cleans them up or
+addresses them, they should be removed.
+
+mathtext user's guide (reviewd by JDH)
+--------------------------------------
+
+This looks good -- there are a few minor things to close the book on
+this chapter.
+
+#. The main thing to wrap this up is getting the mathtext module
+ported over to rest and included in the API so the links from the
+user's guide tutorial work.
+
+#. This section might also benefit from a little more detail on the
+customizations that are possible (eg an example fleshing out the rc
+options a little bit). Admittedly, this is pretty clear from readin
+ghte rc file, but it might be helpful to a newbie.
+
+#. There is still a TODO in the file to include a complete list of symbols
+
Modified: trunk/matplotlib/doc/users/mathtext.rst
===================================================================
--- trunk/matplotlib/doc/users/mathtext.rst 2008-06-09 15:58:45 UTC (rev 5431)
+++ trunk/matplotlib/doc/users/mathtext.rst 2008-06-09 16:48:50 UTC (rev 5432)
@@ -11,7 +11,7 @@
is a fairly direct adaptation of the layout algorithms in Donald
Knuth's TeX, so the quality is quite good (matplotlib also provides a
``usetex`` option for those who do want to call out to TeX to generate
-their text).
+their text (see :ref:`usetex-tutorial`).
Any text element can use math text. You need to use raw strings
(preceed the quotes with an ``'r'``), and surround the string text
@@ -20,7 +20,8 @@
Modern fonts (from (La)TeX), `STIX <http://www.aip.org/stixfonts/>`_
fonts (with are designed to blend well with Times) or a Unicode font
that you provide. The mathtext font can be selected with the
-customization variable ``mathtext.fontset``.
+customization variable ``mathtext.fontset`` (see
+:ref:`customizing-matplotlib`)
Here is a simple example::
@@ -165,7 +166,8 @@
.. image:: ../_static/stix_fonts.png
There are also three global "font sets" to choose from, which are
-selected using the ``mathtext.fontset`` parameter in ``matplotibrc``.
+selected using the ``mathtext.fontset`` parameter in
+::ref:`matplotlibrc <matplotlibrc-sample>`.
``cm``: **Computer Modern (TeX)**
Modified: trunk/matplotlib/doc/users/usetex.rst
===================================================================
--- trunk/matplotlib/doc/users/usetex.rst 2008-06-09 15:58:45 UTC (rev 5431)
+++ trunk/matplotlib/doc/users/usetex.rst 2008-06-09 16:48:50 UTC (rev 5432)
@@ -7,16 +7,17 @@
Matplotlib has the option to use LaTeX to manage all text layout. This
option is available with the following backends:
-* \*Agg
+* Agg
* PS
* PDF
-The LaTeX option is activated by setting text.usetex : true in your rc
-settings. Text handling with matplotlib's LaTeX support is slower than
-matplotlib's very capable :ref:`mathtext <mathtext-tutorial>`, but is more
-flexible, since different LaTeX packages (font packages, math packages, etc.)
-can be used. The results can be striking, especially when you take care to use
-the same fonts in your figures as in the main document.
+The LaTeX option is activated by setting ``text.usetex : True`` in
+your rc settings. Text handling with matplotlib's LaTeX support is
+slower than matplotlib's very capable :ref:`mathtext
+<mathtext-tutorial>`, but is more flexible, since different LaTeX
+packages (font packages, math packages, etc.) can be used. The
+results can be striking, especially when you take care to use the same
+fonts in your figures as in the main document.
Matplotlib's LaTeX support requires a working LaTeX_ installation, dvipng_
(which may be included with your LaTeX installation), and Ghostscript_
@@ -126,4 +127,4 @@
.. _Ghostscript: http://www.cs.wisc.edu/~ghost/
.. _PSNFSS: http://www.ctan.org/tex-archive/macros/latex/required/psnfss/psnfss2e.pdf
.. _Poppler: http://poppler.freedesktop.org/
-.. _Xpdf: http://www.foolabs.com/xpdf
\ No newline at end of file
+.. _Xpdf: http://www.foolabs.com/xpdf
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ds...@us...> - 2008-06-09 15:59:50
|
Revision: 5431
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5431&view=rev
Author: dsdale
Date: 2008-06-09 08:58:45 -0700 (Mon, 09 Jun 2008)
Log Message:
-----------
dont install enthought.traits
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/lib/matplotlib/artist.py
trunk/matplotlib/setup.cfg.template
trunk/matplotlib/setupext.py
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2008-06-09 12:13:20 UTC (rev 5430)
+++ trunk/matplotlib/CHANGELOG 2008-06-09 15:58:45 UTC (rev 5431)
@@ -1,3 +1,8 @@
+2008-06-09 Don't install Enthought.Traits along with matplotlib. For
+ matplotlib developers convenience, it can still be
+ installed by setting an option in setup.cfg while we figure
+ decide if there is a future for the traited config - DSD
+
2008-06-09 Added range keyword arg to hist() - MM
2008-06-07 Moved list of backends to rcsetup.py; made use of lower
Modified: trunk/matplotlib/lib/matplotlib/artist.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/artist.py 2008-06-09 12:13:20 UTC (rev 5430)
+++ trunk/matplotlib/lib/matplotlib/artist.py 2008-06-09 15:58:45 UTC (rev 5431)
@@ -179,7 +179,7 @@
def set_contains(self,picker):
"""Replace the contains test used by this artist. The new picker should
be a callable function which determines whether the artist is hit by the
- mouse event:
+ mouse event::
hit, props = picker(artist, mouseevent)
Modified: trunk/matplotlib/setup.cfg.template
===================================================================
--- trunk/matplotlib/setup.cfg.template 2008-06-09 12:13:20 UTC (rev 5430)
+++ trunk/matplotlib/setup.cfg.template 2008-06-09 15:58:45 UTC (rev 5431)
@@ -25,7 +25,8 @@
#pytz = False
#dateutil = False
#
-## Experimental config package support:
+## Experimental config package support, this should only be enabled by
+## matplotlib developers, for matplotlib development
#enthought.traits = False
#configobj = False
Modified: trunk/matplotlib/setupext.py
===================================================================
--- trunk/matplotlib/setupext.py 2008-06-09 12:13:20 UTC (rev 5430)
+++ trunk/matplotlib/setupext.py 2008-06-09 15:58:45 UTC (rev 5431)
@@ -106,7 +106,7 @@
'provide_pytz': 'auto',
'provide_dateutil': 'auto',
'provide_configobj': 'auto',
- 'provide_traits': 'auto',
+ 'provide_traits': False,
'build_agg': True,
'build_gtk': 'auto',
'build_gtkagg': 'auto',
@@ -141,7 +141,7 @@
try: options['provide_traits'] = config.getboolean("provide_packages",
"enthought.traits")
- except: options['provide_traits'] = 'auto'
+ except: options['provide_traits'] = False
try: options['build_gtk'] = config.getboolean("gui_support", "gtk")
except: options['build_gtk'] = 'auto'
@@ -462,9 +462,11 @@
return False
def check_provide_traits():
- if options['provide_traits'] is True:
- print_status("enthought.traits", "matplotlib will provide")
- return True
+ # Let's not install traits by default for now, unless it is specifically
+ # asked for in setup.cfg AND it is not already installed
+# if options['provide_traits'] is True:
+# print_status("enthought.traits", "matplotlib will provide")
+# return True
try:
from enthought import traits
try:
@@ -478,12 +480,16 @@
version = version.version
except AttributeError:
version = version.__version__
- if version.endswith('mpl'):
- print_status("enthought.traits", "matplotlib will provide")
- return True
- else:
- print_status("enthought.traits", version)
- return False
+ # next 2 lines added temporarily while we figure out what to do
+ # with traits:
+ print_status("enthought.traits", version)
+ return False
+# if version.endswith('mpl'):
+# print_status("enthought.traits", "matplotlib will provide")
+# return True
+# else:
+# print_status("enthought.traits", version)
+# return False
except ImportError:
if options['provide_traits']:
print_status("enthought.traits", "matplotlib will provide")
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mme...@us...> - 2008-06-09 12:13:49
|
Revision: 5430
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5430&view=rev
Author: mmetz_bn
Date: 2008-06-09 05:13:20 -0700 (Mon, 09 Jun 2008)
Log Message:
-----------
Added range keyword arg to hist()
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/lib/matplotlib/axes.py
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2008-06-09 07:22:56 UTC (rev 5429)
+++ trunk/matplotlib/CHANGELOG 2008-06-09 12:13:20 UTC (rev 5430)
@@ -1,4 +1,6 @@
-2008=06-07 Moved list of backends to rcsetup.py; made use of lower
+2008-06-09 Added range keyword arg to hist() - MM
+
+2008-06-07 Moved list of backends to rcsetup.py; made use of lower
case for backend names consistent; use validate_backend
when importing backends subpackage - EF
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py 2008-06-09 07:22:56 UTC (rev 5429)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2008-06-09 12:13:20 UTC (rev 5430)
@@ -5649,7 +5649,7 @@
#### Data analysis
- def hist(self, x, bins=10, normed=False, cumulative=False,
+ def hist(self, x, bins=10, range=None, normed=False, cumulative=False,
bottom=None, histtype='bar', align='mid',
orientation='vertical', rwidth=None, log=False, **kwargs):
"""
@@ -5669,6 +5669,10 @@
either an integer number of bins or a sequence giving the
bins. x are the data to be binned. x can be an array or a 2D
array with multiple data in its columns.
+
+ range:
+ The lower and upper range of the bins. Lower and upper outliers
+ are ignored. If not provided, range is (x.min(), x.max()).
normed:
if True, the first element of the return tuple will
@@ -5742,11 +5746,11 @@
for i in xrange(x.shape[1]):
# this will automatically overwrite bins,
# so that each histogram uses the same bins
- m, bins = np.histogram(x[:,i], bins, range=None,
+ m, bins = np.histogram(x[:,i], bins, range=range,
normed=bool(normed), new=True)
n.append(m)
else:
- n, bins = np.histogram(x, bins, range=None,
+ n, bins = np.histogram(x, bins, range=range,
normed=bool(normed), new=True)
n = [n,]
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ef...@us...> - 2008-06-09 07:22:58
|
Revision: 5429
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5429&view=rev
Author: efiring
Date: 2008-06-09 00:22:56 -0700 (Mon, 09 Jun 2008)
Log Message:
-----------
Reverting part of r5420; this should be temporary.
It seems that to make "ipython -pylab" work with interactive
backends, with the exceptions of tkagg and qt4agg, the old
mixed-case backend names need to be preserved in the
interactive_bk list.
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/rcsetup.py
Modified: trunk/matplotlib/lib/matplotlib/rcsetup.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/rcsetup.py 2008-06-09 03:34:24 UTC (rev 5428)
+++ trunk/matplotlib/lib/matplotlib/rcsetup.py 2008-06-09 07:22:56 UTC (rev 5429)
@@ -12,8 +12,15 @@
from matplotlib.fontconfig_pattern import parse_fontconfig_pattern
from matplotlib.colors import is_color_like
-interactive_bk = ['gtk', 'gtkagg', 'gtkcairo', 'fltkagg', 'qtagg', 'qt4agg',
- 'tkagg', 'wx', 'wxagg', 'cocoaagg']
+#interactive_bk = ['gtk', 'gtkagg', 'gtkcairo', 'fltkagg', 'qtagg', 'qt4agg',
+# 'tkagg', 'wx', 'wxagg', 'cocoaagg']
+# The capitalized forms seem to be needed for ipython at present;
+# this is mysterious to me (EF).
+
+interactive_bk = ['GTK', 'GTKAgg', 'GTKCairo', 'FltkAgg', 'QtAgg', 'Qt4Agg',
+ 'TkAgg', 'WX', 'WXAgg', 'CocoaAgg']
+
+
non_interactive_bk = ['agg', 'cairo', 'emf', 'gdk',
'pdf', 'ps', 'svg', 'template']
all_backends = interactive_bk + non_interactive_bk
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ef...@us...> - 2008-06-09 03:34:30
|
Revision: 5428
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5428&view=rev
Author: efiring
Date: 2008-06-08 20:34:24 -0700 (Sun, 08 Jun 2008)
Log Message:
-----------
Fix bug in imshow, introduced in r5042, found by A. Straw
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/image.py
Modified: trunk/matplotlib/lib/matplotlib/image.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/image.py 2008-06-09 00:01:14 UTC (rev 5427)
+++ trunk/matplotlib/lib/matplotlib/image.py 2008-06-09 03:34:24 UTC (rev 5428)
@@ -170,7 +170,7 @@
if self._imcache is None:
if self._A.dtype == np.uint8 and len(self._A.shape) == 3:
- im = _image.frombyte(self._A[xslice,yslice,:], 0)
+ im = _image.frombyte(self._A[yslice,xslice,:], 0)
im.is_grayscale = False
else:
if self._rgbacache is None:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ef...@us...> - 2008-06-09 00:01:22
|
Revision: 5427
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5427&view=rev
Author: efiring
Date: 2008-06-08 17:01:14 -0700 (Sun, 08 Jun 2008)
Log Message:
-----------
Fix typo in list of backends
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/rcsetup.py
Modified: trunk/matplotlib/lib/matplotlib/rcsetup.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/rcsetup.py 2008-06-08 23:34:01 UTC (rev 5426)
+++ trunk/matplotlib/lib/matplotlib/rcsetup.py 2008-06-09 00:01:14 UTC (rev 5427)
@@ -14,7 +14,7 @@
interactive_bk = ['gtk', 'gtkagg', 'gtkcairo', 'fltkagg', 'qtagg', 'qt4agg',
'tkagg', 'wx', 'wxagg', 'cocoaagg']
-non_interactive_bk = ['agg', 'cairo', 'emv', 'gdk',
+non_interactive_bk = ['agg', 'cairo', 'emf', 'gdk',
'pdf', 'ps', 'svg', 'template']
all_backends = interactive_bk + non_interactive_bk
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ds...@us...> - 2008-06-08 23:34:05
|
Revision: 5426
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5426&view=rev
Author: dsdale
Date: 2008-06-08 16:34:01 -0700 (Sun, 08 Jun 2008)
Log Message:
-----------
finish converting axes.py docstrings to ReST
Modified Paths:
--------------
trunk/matplotlib/doc/api/index.rst
trunk/matplotlib/doc/api/pyplot_api.rst
trunk/matplotlib/doc/faq/environment_variables_faq.rst
trunk/matplotlib/lib/matplotlib/axes.py
Modified: trunk/matplotlib/doc/api/index.rst
===================================================================
--- trunk/matplotlib/doc/api/index.rst 2008-06-08 20:31:47 UTC (rev 5425)
+++ trunk/matplotlib/doc/api/index.rst 2008-06-08 23:34:01 UTC (rev 5426)
@@ -12,5 +12,6 @@
.. toctree::
artist_api.rst
+ axes_api.rst
pyplot_api.rst
Modified: trunk/matplotlib/doc/api/pyplot_api.rst
===================================================================
--- trunk/matplotlib/doc/api/pyplot_api.rst 2008-06-08 20:31:47 UTC (rev 5425)
+++ trunk/matplotlib/doc/api/pyplot_api.rst 2008-06-08 23:34:01 UTC (rev 5426)
@@ -7,4 +7,5 @@
=============================
.. automodule:: matplotlib.pyplot
- :members:
\ No newline at end of file
+ :members:
+ :undoc-members:
\ No newline at end of file
Modified: trunk/matplotlib/doc/faq/environment_variables_faq.rst
===================================================================
--- trunk/matplotlib/doc/faq/environment_variables_faq.rst 2008-06-08 20:31:47 UTC (rev 5425)
+++ trunk/matplotlib/doc/faq/environment_variables_faq.rst 2008-06-08 23:34:01 UTC (rev 5426)
@@ -4,18 +4,12 @@
Environment Variables
*********************
-====================== =======================================================
-Environment Variable Description
-====================== =======================================================
-.. envvar:: PATH The list of directories searched to find executable
- programs
-.. envvar:: PYTHONPATH The list of directories that is searched to find Python
- packages and modules
-====================== =======================================================
+.. envvar:: PATH:
+ The list of directories searched to find executable programs
+.. envvar:: PYTHONPATH:
+ The list of directories that is searched to find Python packages and modules
-
-
Setting Environment Variables
=============================
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py 2008-06-08 20:31:47 UTC (rev 5425)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2008-06-08 23:34:01 UTC (rev 5426)
@@ -452,7 +452,6 @@
connect to are 'xlim_changed' and 'ylim_changed' and the callback
will be called with func(ax) where ax is the Axes instance
-
"""
name = "rectilinear"
@@ -574,7 +573,7 @@
def set_figure(self, fig):
"""
- Set the Axes figure
+ Set the Axes' figure
accepts a Figure instance
"""
@@ -926,24 +925,24 @@
adjustable:
- ======== ============================
- value description
- ======== ============================
- 'box' change physical size of axes
- 'datalim' change xlim or ylim
- ======== ============================
+ ========= ============================
+ value description
+ ========= ============================
+ 'box' change physical size of axes
+ 'datalim' change xlim or ylim
+ ========= ============================
anchor:
- ==== =====================
- value description
- ==== =====================
- 'C' centered
- 'SW' lower left corner
- 'S' middle of bottom edge
- 'SE' lower right corner
+ ===== =====================
+ value description
+ ===== =====================
+ 'C' centered
+ 'SW' lower left corner
+ 'S' middle of bottom edge
+ 'SE' lower right corner
etc.
- ==== =====================
+ ===== =====================
"""
if aspect in ('normal', 'auto'):
@@ -963,7 +962,7 @@
def set_adjustable(self, adjustable):
"""
- ACCEPTS: ['box' | 'datalim']
+ ACCEPTS: [ 'box' | 'datalim' ]
"""
if adjustable in ('box', 'datalim'):
self._adjustable = adjustable
@@ -1105,8 +1104,6 @@
#print 'New x0, x1:', x0, x1
#print 'New xsize, ysize/xsize', x1-x0, ysize/(x1-x0)
-
-
def axis(self, *v, **kwargs):
'''
Convenience method for manipulating the x and y view limits
@@ -1165,7 +1162,6 @@
return v
-
def get_child_artists(self):
"""
Return a list of artists the axes contains. Deprecated
@@ -1434,6 +1430,7 @@
self.set_position(new_position, 'active')
#### Drawing
+
def draw(self, renderer=None, inframe=False):
"Draw everything (plot lines, axes, labels)"
if renderer is None:
@@ -1551,7 +1548,7 @@
"""
Set whether the axes rectangle patch is drawn
- ACCEPTS: True|False
+ ACCEPTS: [ True | False ]
"""
self._frameon = b
@@ -1565,7 +1562,7 @@
"""
Set whether the axis ticks and gridlines are above or below most artists
- ACCEPTS: True|False
+ ACCEPTS: [ True | False ]
"""
self._axisbelow = b
@@ -1822,8 +1819,10 @@
def set_xticklabels(self, labels, fontdict=None, minor=False, **kwargs):
"""
- set_xticklabels(labels, fontdict=None, minor=False, **kwargs)
+ call signature::
+ set_xticklabels(labels, fontdict=None, minor=False, **kwargs)
+
Set the xtick labels with list of strings labels Return a list of axis
text instances.
@@ -1884,21 +1883,26 @@
def set_ylim(self, ymin=None, ymax=None, emit=True, **kwargs):
"""
- set_ylim(self, *args, **kwargs):
+ call signature::
- Set the limits for the yaxis; v = [ymin, ymax]
+ set_ylim(self, *args, **kwargs):
- set_ylim((valmin, valmax))
- set_ylim(valmin, valmax)
- set_ylim(ymin=1) # ymax unchanged
- set_ylim(ymax=1) # ymin unchanged
+ Set the limits for the yaxis; v = [ymin, ymax]::
- Valid kwargs:
+ set_ylim((valmin, valmax))
+ set_ylim(valmin, valmax)
+ set_ylim(ymin=1) # ymax unchanged
+ set_ylim(ymax=1) # ymin unchanged
- ymin : the min of the ylim
- ymax : the max of the ylim
- emit : notify observers of lim change
+ Keyword arguments:
+ ymin: scalar
+ the min of the ylim
+ ymax: scalar
+ the max of the ylim
+ emit: [ True | False ]
+ notify observers of lim change
+
Returns the current ylimits as a length 2 tuple
ACCEPTS: len(2) sequence of floats
@@ -1937,8 +1941,10 @@
def set_yscale(self, value, **kwargs):
"""
- SET_YSCALE(value)
+ call signature::
+ set_yscale(value)
+
Set the scaling of the y-axis: %(scale)s
ACCEPTS: [%(scale)s]
@@ -1960,6 +1966,11 @@
Set the y ticks with list of ticks
ACCEPTS: sequence of floats
+
+ Keyword arguments:
+
+ minor: [ False | True ]
+ Sets the minor ticks if True
"""
return self.yaxis.set_ticks(ticks, minor=minor)
@@ -1977,8 +1988,10 @@
def set_yticklabels(self, labels, fontdict=None, minor=False, **kwargs):
"""
- set_yticklabels(labels, fontdict=None, minor=False, **kwargs)
+ call signature::
+ set_yticklabels(labels, fontdict=None, minor=False, **kwargs)
+
Set the ytick labels with list of strings labels. Return a list of
Text instances.
@@ -2100,7 +2113,7 @@
"""
Set whether the axes responds to navigation toolbar commands
- ACCEPTS: True|False
+ ACCEPTS: [ True | False ]
"""
self._navigate = b
@@ -2124,10 +2137,11 @@
x, y are the mouse coordinates in display coords.
button is the mouse button number:
- 1: LEFT
- 2: MIDDLE
- 3: RIGHT
+ * 1: LEFT
+ * 2: MIDDLE
+ * 3: RIGHT
+
Intended to be overridden by new projection types.
"""
self._pan_start = cbook.Bunch(
@@ -2153,10 +2167,11 @@
Called when the mouse moves during a pan operation.
button is the mouse button number:
- 1: LEFT
- 2: MIDDLE
- 3: RIGHT
+ * 1: LEFT
+ * 2: MIDDLE
+ * 3: RIGHT
+
key is a "shift" key
x, y are the mouse coordinates in display coords.
@@ -2221,10 +2236,14 @@
def set_cursor_props(self, *args):
"""
- Set the cursor property as
- ax.set_cursor_props(linewidth, color) OR
- ax.set_cursor_props((linewidth, color))
+ Set the cursor property as::
+ ax.set_cursor_props(linewidth, color)
+
+ or::
+
+ ax.set_cursor_props((linewidth, color))
+
ACCEPTS: a (float, color) tuple
"""
if len(args)==1:
@@ -2240,7 +2259,7 @@
"""
Register observers to be notified when certain events occur. Register
with callback functions with the following signatures. The function
- has the following signature
+ has the following signature::
func(ax) # where ax is the instance making the callback.
@@ -2365,8 +2384,6 @@
ds.sort()
return ds[0][1]
-
-
#### Labelling
def get_title(self):
@@ -2377,8 +2394,10 @@
def set_title(self, label, fontdict=None, **kwargs):
"""
- SET_TITLE(label, fontdict=None, **kwargs):
+ call signature::
+ set_title(label, fontdict=None, **kwargs):
+
Set the title for the axes. See the text docstring for information
of how override and the optional args work
@@ -2409,8 +2428,10 @@
def set_xlabel(self, xlabel, fontdict=None, **kwargs):
"""
- SET_XLABEL(xlabel, fontdict=None, **kwargs)
+ call signature::
+ set_xlabel(xlabel, fontdict=None, **kwargs)
+
Set the label for the xaxis. See the text docstring for information
of how override and the optional args work.
@@ -2435,8 +2456,10 @@
def set_ylabel(self, ylabel, fontdict=None, **kwargs):
"""
- SET_YLABEL(ylabel, fontdict=None, **kwargs)
+ call signature::
+ set_ylabel(ylabel, fontdict=None, **kwargs)
+
Set the label for the yaxis
See the text doctstring for information of how override and
@@ -2535,13 +2558,10 @@
"""
call signature::
- annotate(s, xy,
- xytext=None,
- xycoords='data',
- textcoords='data',
- arrowprops=None,
- **props)
+ annotate(s, xy, xytext=None, xycoords='data',
+ textcoords='data', arrowprops=None, **kwargs)
+ Keyword arguments:
%(Annotation)s
"""
a = mtext.Annotation(*args, **kwargs)
@@ -2802,8 +2822,10 @@
def vlines(self, x, ymin, ymax, colors='k', linestyles='solid',
label='', **kwargs):
"""
- VLINES(x, ymin, ymax, color='k')
+ call signature::
+ vlines(x, ymin, ymax, color='k')
+
Plot vertical lines at each x from ymin to ymax. ymin or ymax can be
scalars or len(x) numpy arrays. If they are scalars, then the
respective values are constant, else the heights of the lines are
@@ -2813,7 +2835,7 @@
colors is a line collections color args, either a single color
or a len(x) list of colors
- linestyle is one of solid|dashed|dashdot|dotted
+ linestyle is one of [ 'solid' | 'dashed' | 'dashdot' | 'dotted' ]
Returns the collections.LineCollection that was added
@@ -3199,8 +3221,11 @@
def xcorr(self, x, y, normed=False, detrend=mlab.detrend_none, usevlines=False,
maxlags=None, **kwargs):
"""
- XCORR(x, y, normed=False, detrend=mlab.detrend_none, usevlines=False, \*\*kwargs):
+ call signature::
+ xcorr(x, y, normed=False, detrend=mlab.detrend_none,
+ usevlines=False, **kwargs):
+
Plot the cross correlation between x and y. If normed=True,
normalize the data but the cross correlation at 0-th lag. x
and y are detrended by the detrend callable (default no
@@ -3220,10 +3245,11 @@
to draw vertical lines from the origin to the acorr.
Otherwise the plotstyle is determined by the kwargs, which are
Line2D properties. If usevlines, the return value is lags, c,
- linecol, b where linecol is the collections.LineCollection and b is the x-axis
+ linecol, b where linecol is the collections.LineCollection and b is the
+ x-axis
- if usevlines=True, kwargs are passed onto Axes.vlines
- if usevlines=False, kwargs are passed onto Axes.plot
+ if ``usevlines=True``, kwargs are passed onto Axes.vlines
+ if ``usevlines=False``, kwargs are passed onto Axes.plot
maxlags is a positive integer detailing the number of lags to show.
The default value of None will return all ``(2*len(x)-1)`` lags.
@@ -3401,7 +3427,6 @@
self.legend_ = mlegend.Legend(self, handles, labels, **kwargs)
return self.legend_
-
#### Specialized plotting
def step(self, x, y, *args, **kwargs):
@@ -3959,9 +3984,6 @@
if autopct is None: return slices, texts
else: return slices, texts, autotexts
-
-
-
def errorbar(self, x, y, yerr=None, xerr=None,
fmt='-', ecolor=None, elinewidth=None, capsize=3,
barsabove=False, lolims=False, uplims=False,
@@ -4946,9 +4968,9 @@
self.autoscale_view()
return patches
fill.__doc__ = cbook.dedent(fill.__doc__) % martist.kwdocd
+
#### plotting z(x,y): imshow, pcolor and relatives, contour
-
def imshow(self, X, cmap=None, norm=None, aspect=None,
interpolation=None, alpha=1.0, vmin=None, vmax=None,
origin=None, extent=None, shape=None, filternorm=1,
@@ -5384,15 +5406,15 @@
def pcolorfast(self, *args, **kwargs):
"""
+ pseudocolor plot of a 2-D array
+
Experimental; this is a version of pcolor that
does not draw lines, that provides the fastest
possible rendering with the Agg backend, and that
can handle any quadrilateral grid.
- pcolor(*args, **kwargs): pseudocolor plot of a 2-D array
+ Call signatures::
- Function signatures
-
pcolor(C, **kwargs)
pcolor(xr, yr, C, **kwargs)
pcolor(x, y, C, **kwargs)
@@ -5401,8 +5423,8 @@
C is the 2D array of color values corresponding to quadrilateral
cells. Let (nr, nc) be its shape. C may be a masked array.
- pcolor(C, **kwargs) is equivalent to
- pcolor([0,nc], [0,nr], C, **kwargs)
+ ``pcolor(C, **kwargs)`` is equivalent to
+ ``pcolor([0,nc], [0,nr], C, **kwargs)``
xr, yr specify the ranges of x and y corresponding to the rectangular
region bounding C. If xr = [x0, x1] and yr = [y0,y1] then
@@ -5430,21 +5452,21 @@
and the row index corresponds to y; for details, see
the "Grid Orientation" section below.
- Optional keyword args are shown with their defaults below (you must
- use kwargs for these):
+ Optional keyword arguments:
- * cmap = cm.jet : a cm Colormap instance from cm
+ cmap: [ None | Colormap ]
+ A cm Colormap instance from cm. If None, use rc settings.
+ norm: [ None | Normalize ]
+ An mcolors.Normalize instance is used to scale luminance data to
+ 0,1. If None, defaults to normalize()
+ vmin/vmax: [ None | scalar ]
+ vmin and vmax are used in conjunction with norm to normalize
+ luminance data. If either are None, the min and max of the color
+ array C is used. If you pass a norm instance, vmin and vmax will
+ be None.
+ alpha: 0 <= scalar <= 1
+ the alpha blending value
- * norm = Normalize() : mcolors.Normalize instance
- is used to scale luminance data to 0,1.
-
- * vmin=None and vmax=None : vmin and vmax are used in conjunction
- with norm to normalize luminance data. If either are None, the
- min and max of the color array C is used. If you pass a norm
- instance, vmin and vmax will be None
-
- * alpha=1.0 : the alpha blending value
-
Return value is an image if a regular or rectangular grid
is specified, and a QuadMesh collection in the general
quadrilateral case.
@@ -5567,12 +5589,14 @@
def table(self, **kwargs):
"""
- TABLE(cellText=None, cellColours=None,
- cellLoc='right', colWidths=None,
- rowLabels=None, rowColours=None, rowLoc='left',
- colLabels=None, colColours=None, colLoc='center',
- loc='bottom', bbox=None):
+ call signature::
+ table(cellText=None, cellColours=None,
+ cellLoc='right', colWidths=None,
+ rowLabels=None, rowColours=None, rowLoc='left',
+ colLabels=None, colColours=None, colLoc='center',
+ loc='bottom', bbox=None):
+
Add a table to the current axes. Returns a table instance. For
finer grained control over tables, use the Table class and add it
to the axes with add_table.
@@ -5587,8 +5611,10 @@
def twinx(self):
"""
- ax = twinx()
+ call signature::
+ ax = twinx()
+
create a twin of Axes for generating a plot with a sharex
x-axis but independent y axis. The y-axis of self will have
ticks on left and the returned axes will have ticks on the
@@ -5604,8 +5630,10 @@
def twiny(self):
"""
- ax = twiny()
+ call signature::
+ ax = twiny()
+
create a twin of Axes for generating a plot with a shared
y-axis but independent x axis. The x-axis of self will have
ticks on bottom and the returned axes will have ticks on the
@@ -5619,10 +5647,8 @@
self.xaxis.tick_bottom()
return ax2
-
#### Data analysis
-
def hist(self, x, bins=10, normed=False, cumulative=False,
bottom=None, histtype='bar', align='mid',
orientation='vertical', rwidth=None, log=False, **kwargs):
@@ -6238,13 +6264,13 @@
fig is a figure instance
args is numRows, numCols, plotNum
- where the array of subplots in the figure has dimensions
- numRows, numCols, and where plotNum is the number of the
- subplot being created. plotNum starts at 1 in the upper
- right corner and increases to the right.
+ where the array of subplots in the figure has dimensions
+ numRows, numCols, and where plotNum is the number of the
+ subplot being created. plotNum starts at 1 in the upper
+ right corner and increases to the right.
- If numRows<=numCols<=plotNum<10, args can be the decimal
- integer numRows*100 + numCols*10 + plotNum.
+ If numRows<=numCols<=plotNum<10, args can be the decimal
+ integer numRows*100 + numCols*10 + plotNum.
"""
self.figure = fig
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ef...@us...> - 2008-06-08 20:31:48
|
Revision: 5425
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5425&view=rev
Author: efiring
Date: 2008-06-08 13:31:47 -0700 (Sun, 08 Jun 2008)
Log Message:
-----------
update documentation outline
Modified Paths:
--------------
trunk/matplotlib/doc/devel/outline.rst
Modified: trunk/matplotlib/doc/devel/outline.rst
===================================================================
--- trunk/matplotlib/doc/devel/outline.rst 2008-06-08 18:20:21 UTC (rev 5424)
+++ trunk/matplotlib/doc/devel/outline.rst 2008-06-08 20:31:47 UTC (rev 5425)
@@ -12,10 +12,9 @@
=============================== ==================== =========== ===================
User's guide unit Author Status Reviewer
=============================== ==================== =========== ===================
-contouring Eric ? no author Perry ?
-quiver plots Eric ? no author ?
-quadmesh ? no author ?
-images ? no author Darren
+plotting 2-D arrays Eric has author Perry ? Darren
+colormapping Eric has author ?
+quiver plots Eric has author ?
histograms Manuel ? no author Erik Tollerud ?
bar / errorbar ? no author ?
x-y plots ? no author Darren
@@ -23,7 +22,7 @@
date plots John has author ?
working with data John has author Darren
custom ticking ? no author ?
-masked data Eric ? no author ?
+masked data Eric has author ?
text ? no author ?
patches ? no author ?
legends ? no author ?
@@ -31,10 +30,9 @@
collections ? no author ?
mathtext Michael ? submitted John
fonts et al Michael ? no author Darren
-pyplot tut John submitted Eric ?
+pyplot tut John submitted Eric
usetex Darren submitted ?
configuration Darren preliminary ?
-colormapping Perry ? no author Eric ?
win32 install Charlie ? no author Darren
os x install Charlie ? no author ?
linux install Darren has author ?
@@ -64,7 +62,7 @@
the artist John has author ?
transforms Michael submitted John
documenting mpl Darren submitted ?
-coding guide John submitted Eric ?
+coding guide John submitted Eric
and_much_more ? ? ?
=============================== ==================== =========== ===================
@@ -96,4 +94,4 @@
produce and checking their work, so don't be shy. You *do not* need
to be an expert in the subject you are editing -- you should know
something about it and be willing to read, test, give feedback and
-pester!
\ No newline at end of file
+pester!
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ds...@us...> - 2008-06-08 18:20:28
|
Revision: 5424
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5424&view=rev
Author: dsdale
Date: 2008-06-08 11:20:21 -0700 (Sun, 08 Jun 2008)
Log Message:
-----------
documentation work
Modified Paths:
--------------
trunk/matplotlib/doc/faq/environment_variables_faq.rst
trunk/matplotlib/doc/users/usetex.rst
Modified: trunk/matplotlib/doc/faq/environment_variables_faq.rst
===================================================================
--- trunk/matplotlib/doc/faq/environment_variables_faq.rst 2008-06-08 18:01:58 UTC (rev 5423)
+++ trunk/matplotlib/doc/faq/environment_variables_faq.rst 2008-06-08 18:20:21 UTC (rev 5424)
@@ -8,7 +8,7 @@
Environment Variable Description
====================== =======================================================
.. envvar:: PATH The list of directories searched to find executable
- programs
+ programs
.. envvar:: PYTHONPATH The list of directories that is searched to find Python
packages and modules
====================== =======================================================
Modified: trunk/matplotlib/doc/users/usetex.rst
===================================================================
--- trunk/matplotlib/doc/users/usetex.rst 2008-06-08 18:01:58 UTC (rev 5423)
+++ trunk/matplotlib/doc/users/usetex.rst 2008-06-08 18:20:21 UTC (rev 5424)
@@ -103,7 +103,7 @@
installation may be the only external dependency.
= In the event that things dont work =
- * Try deleting `tex.cache` from your :envvar:`MATPLOTLIBDATA` directory
+ * Try deleting `tex.cache` from your `~/.matplotlib` directory
* Make sure LaTeX, dvipng and ghostscript are each working and on your PATH.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ds...@us...> - 2008-06-08 18:02:08
|
Revision: 5423
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5423&view=rev
Author: dsdale
Date: 2008-06-08 11:01:58 -0700 (Sun, 08 Jun 2008)
Log Message:
-----------
added documentation for usetex
added a static_figs directory for scripts that require optional features
to generate images for the documentation
Modified Paths:
--------------
trunk/matplotlib/doc/devel/outline.rst
trunk/matplotlib/doc/faq/index.rst
trunk/matplotlib/doc/faq/installing_faq.rst
trunk/matplotlib/doc/static_figs/README
trunk/matplotlib/doc/users/figures/make.py
trunk/matplotlib/doc/users/index.rst
trunk/matplotlib/examples/pylab_examples/tex_demo.py
trunk/matplotlib/examples/pylab_examples/tex_unicode_demo.py
Added Paths:
-----------
trunk/matplotlib/doc/_static/tex_demo.png
trunk/matplotlib/doc/_static/tex_unicode_demo.png
trunk/matplotlib/doc/faq/environment_variables_faq.rst
trunk/matplotlib/doc/static_figs/make.py
trunk/matplotlib/doc/static_figs/tex_demo.png
trunk/matplotlib/doc/static_figs/tex_demo.py
trunk/matplotlib/doc/static_figs/tex_unicode_demo.py
trunk/matplotlib/doc/users/usetex.rst
Added: trunk/matplotlib/doc/_static/tex_demo.png
===================================================================
(Binary files differ)
Property changes on: trunk/matplotlib/doc/_static/tex_demo.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/matplotlib/doc/_static/tex_unicode_demo.png
===================================================================
(Binary files differ)
Property changes on: trunk/matplotlib/doc/_static/tex_unicode_demo.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/matplotlib/doc/devel/outline.rst
===================================================================
--- trunk/matplotlib/doc/devel/outline.rst 2008-06-08 02:25:39 UTC (rev 5422)
+++ trunk/matplotlib/doc/devel/outline.rst 2008-06-08 18:01:58 UTC (rev 5423)
@@ -32,7 +32,7 @@
mathtext Michael ? submitted John
fonts et al Michael ? no author Darren
pyplot tut John submitted Eric ?
-usetex Darren has author ?
+usetex Darren submitted ?
configuration Darren preliminary ?
colormapping Perry ? no author Eric ?
win32 install Charlie ? no author Darren
@@ -64,8 +64,7 @@
the artist John has author ?
transforms Michael submitted John
documenting mpl Darren submitted ?
-coding guide John submitted Eric (Darren
-suggests)?
+coding guide John submitted Eric ?
and_much_more ? ? ?
=============================== ==================== =========== ===================
Added: trunk/matplotlib/doc/faq/environment_variables_faq.rst
===================================================================
--- trunk/matplotlib/doc/faq/environment_variables_faq.rst (rev 0)
+++ trunk/matplotlib/doc/faq/environment_variables_faq.rst 2008-06-08 18:01:58 UTC (rev 5423)
@@ -0,0 +1,28 @@
+.. _environment-variables:
+
+*********************
+Environment Variables
+*********************
+
+====================== =======================================================
+Environment Variable Description
+====================== =======================================================
+.. envvar:: PATH The list of directories searched to find executable
+ programs
+.. envvar:: PYTHONPATH The list of directories that is searched to find Python
+ packages and modules
+====================== =======================================================
+
+
+
+
+Setting Environment Variables
+=============================
+
+Linux/OS-X
+----------
+
+
+
+Windows
+-------
Modified: trunk/matplotlib/doc/faq/index.rst
===================================================================
--- trunk/matplotlib/doc/faq/index.rst 2008-06-08 02:25:39 UTC (rev 5422)
+++ trunk/matplotlib/doc/faq/index.rst 2008-06-08 18:01:58 UTC (rev 5423)
@@ -14,4 +14,4 @@
installing_faq.rst
troubleshooting_faq.rst
howto_faq.rst
-
+ environment_variables_faq.rst
Modified: trunk/matplotlib/doc/faq/installing_faq.rst
===================================================================
--- trunk/matplotlib/doc/faq/installing_faq.rst 2008-06-08 02:25:39 UTC (rev 5422)
+++ trunk/matplotlib/doc/faq/installing_faq.rst 2008-06-08 18:01:58 UTC (rev 5423)
@@ -1,8 +1,8 @@
.. _installing-faq:
-==================
+******************
Installation FAQ
-==================
+******************
How do I report a compilation problem?
======================================
Modified: trunk/matplotlib/doc/static_figs/README
===================================================================
--- trunk/matplotlib/doc/static_figs/README 2008-06-08 02:25:39 UTC (rev 5422)
+++ trunk/matplotlib/doc/static_figs/README 2008-06-08 18:01:58 UTC (rev 5423)
@@ -1,4 +1,9 @@
-Scripts that require optional system configurations to generate scripts should go here. The
-figures will be generated in doc/_static, and will be named based on the name of the script,
-so we can avoid unintentionally overwriting any existing figures. Please add a line to this
-file for any additional requirements necessary to generate a new figure.
+Scripts that require optional system configurations to generate scripts should
+go here. The figures will be generated in doc/_static, and will be named based
+on the name of the script, so we can avoid unintentionally overwriting any
+existing figures. Please add a line to this file for any additional
+requirements necessary to generate a new figure.
+
+tex demos:
+ latex
+ dvipng
Added: trunk/matplotlib/doc/static_figs/make.py
===================================================================
--- trunk/matplotlib/doc/static_figs/make.py (rev 0)
+++ trunk/matplotlib/doc/static_figs/make.py 2008-06-08 18:01:58 UTC (rev 5423)
@@ -0,0 +1,58 @@
+#!/usr/bin/env python
+import sys, os, glob
+import matplotlib
+import IPython.Shell
+matplotlib.rcdefaults()
+matplotlib.use('Agg')
+
+mplshell = IPython.Shell.MatplotlibShell('mpl')
+
+def figs():
+ print 'making figs'
+ import matplotlib.pyplot as plt
+ for fname in glob.glob('*.py'):
+ if fname.split('/')[-1] == __file__.split('/')[-1]: continue
+ basename, ext = os.path.splitext(fname)
+ outfile = '../_static/%s.png'%basename
+
+ if os.path.exists(outfile):
+ print ' already have %s'%outfile
+ continue
+ else:
+ print ' building %s'%fname
+ plt.close('all') # we need to clear between runs
+ mplshell.magic_run(basename)
+ plt.savefig(outfile)
+ print 'all figures made'
+
+
+def clean():
+ patterns = ['#*', '*~', '*.png', '*pyc']
+ for pattern in patterns:
+ for fname in glob.glob(pattern):
+ os.remove(fname)
+ print 'all clean'
+
+
+
+def all():
+ figs()
+
+funcd = {'figs':figs,
+ 'clean':clean,
+ 'all':all,
+ }
+
+if len(sys.argv)>1:
+ for arg in sys.argv[1:]:
+ func = funcd.get(arg)
+ if func is None:
+ raise SystemExit('Do not know how to handle %s; valid args are'%(
+ arg, funcd.keys()))
+ func()
+else:
+ all()
+
+
+
+
Property changes on: trunk/matplotlib/doc/static_figs/make.py
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/matplotlib/doc/static_figs/tex_demo.png
===================================================================
(Binary files differ)
Property changes on: trunk/matplotlib/doc/static_figs/tex_demo.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/matplotlib/doc/static_figs/tex_demo.py
===================================================================
--- trunk/matplotlib/doc/static_figs/tex_demo.py (rev 0)
+++ trunk/matplotlib/doc/static_figs/tex_demo.py 2008-06-08 18:01:58 UTC (rev 5423)
@@ -0,0 +1 @@
+link ../mpl_examples/pylab_examples/tex_demo.py
\ No newline at end of file
Property changes on: trunk/matplotlib/doc/static_figs/tex_demo.py
___________________________________________________________________
Name: svn:special
+ *
Added: trunk/matplotlib/doc/static_figs/tex_unicode_demo.py
===================================================================
--- trunk/matplotlib/doc/static_figs/tex_unicode_demo.py (rev 0)
+++ trunk/matplotlib/doc/static_figs/tex_unicode_demo.py 2008-06-08 18:01:58 UTC (rev 5423)
@@ -0,0 +1 @@
+link ../mpl_examples/pylab_examples/tex_unicode_demo.py
\ No newline at end of file
Property changes on: trunk/matplotlib/doc/static_figs/tex_unicode_demo.py
___________________________________________________________________
Name: svn:special
+ *
Modified: trunk/matplotlib/doc/users/figures/make.py
===================================================================
--- trunk/matplotlib/doc/users/figures/make.py 2008-06-08 02:25:39 UTC (rev 5422)
+++ trunk/matplotlib/doc/users/figures/make.py 2008-06-08 18:01:58 UTC (rev 5423)
@@ -22,7 +22,7 @@
print ' building %s'%fname
plt.close('all') # we need to clear between runs
mplshell.magic_run(basename)
- plt.savefig('%s.png'%basename)
+ plt.savefig(outfile)
print 'all figures made'
Modified: trunk/matplotlib/doc/users/index.rst
===================================================================
--- trunk/matplotlib/doc/users/index.rst 2008-06-08 02:25:39 UTC (rev 5422)
+++ trunk/matplotlib/doc/users/index.rst 2008-06-08 18:01:58 UTC (rev 5423)
@@ -16,5 +16,6 @@
customizing.rst
artists.rst
event_handling.rst
+ usetex.rst
Added: trunk/matplotlib/doc/users/usetex.rst
===================================================================
--- trunk/matplotlib/doc/users/usetex.rst (rev 0)
+++ trunk/matplotlib/doc/users/usetex.rst 2008-06-08 18:01:58 UTC (rev 5423)
@@ -0,0 +1,129 @@
+.. _usetex-tutorial:
+
+*************************
+Text Rendering With LaTeX
+*************************
+
+Matplotlib has the option to use LaTeX to manage all text layout. This
+option is available with the following backends:
+
+* \*Agg
+* PS
+* PDF
+
+The LaTeX option is activated by setting text.usetex : true in your rc
+settings. Text handling with matplotlib's LaTeX support is slower than
+matplotlib's very capable :ref:`mathtext <mathtext-tutorial>`, but is more
+flexible, since different LaTeX packages (font packages, math packages, etc.)
+can be used. The results can be striking, especially when you take care to use
+the same fonts in your figures as in the main document.
+
+Matplotlib's LaTeX support requires a working LaTeX_ installation, dvipng_
+(which may be included with your LaTeX installation), and Ghostscript_
+(GPL Ghostscript 8.60 or later is recommended). The executables for these
+external dependencies must all be located on your :envvar:`PATH`.
+
+There are a couple of options to mention, which can be changed using :ref:`rc
+settings <customizing-matplotlib>`. Here is an example matplotlibrc file::
+
+ font.family : serif
+ font.serif : Times, Palatino, New Century Schoolbook, Bookman, Computer Modern Roman
+ font.sans-serif : Helvetica, Avant Garde, Computer Modern Sans serif
+ font.cursive : Zapf Chancery
+ font.monospace : Courier, Computer Modern Typewriter
+
+ text.usetex : true
+
+The first valid font in each family is the one that will be loaded. If the
+fonts are not specified, the Computer Modern fonts are used by default. All of
+the other fonts are Adobe fonts. Times and Palatino each have their own
+accompanying math fonts, while the other Adobe serif fonts make use of the
+Computer Modern math fonts. See the PSNFSS_ documentation for more details.
+
+To use LaTeX and select Helvetica as the default font, without editing
+matplotlibrc use::
+
+ from matplotlib import rc
+ rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']})
+ ## for Palatino and other serif fonts use:
+ #rc('font',**{'family':'serif','serif':['Palatino']))
+ rc('text', usetex=True)
+
+Here is the standard example, `tex_demo.py`:
+
+ .. literalinclude:: ../mpl_examples/pylab_examples/tex_demo.py
+
+.. image:: ../_static/tex_demo.png
+
+Note that display math mode (``$$ e=mc^2 $$``) is not supported, but adding the
+command ``\displaystyle``, as in `tex_demo.py`, will produce the same
+results.
+
+It is also possible to use unicode strings with the LaTeX text manager, here is
+an example taken from `tex_unicode_demo.py`:
+
+ .. literalinclude:: ../mpl_examples/pylab_examples/tex_unicode_demo.py
+
+.. image:: ../_static/tex_unicode_demo.png
+
+In order to produce encapsulated postscript files that can be embedded in a new
+LaTeX document, the default behavior of matplotlib is to distill the output,
+which removes some postscript operators used by LaTeX that are illegal in an
+eps file. This step produces fonts which may be unacceptable to some users. One
+workaround is to to set ``ps.distiller.res`` to a higher value (perhaps 6000) in
+your rc settings. A better workaround, which requires Poppler_ or Xpdf_, can be
+activated by changing the ``ps.usedistiller`` rc setting to ``xpdf``. This
+alternative produces postscript with text that can be edited in Adobe
+Illustrator, and searched text in pdf documents.
+
+
+= Possible Hangups =
+
+ * On Windows, the PATH environment variable may need to be modified to find
+ the latex, dvipng and ghostscript executables. This is done by going to the
+ control panel, selecting the "system" icon, selecting the "advanced" tab,
+ and clicking the "environment variables" button (and people think Linux is
+ complicated. Sheesh.) Select the PATH variable, and add the appropriate
+ directories.
+
+ * Using MiKTeX with Computer Modern fonts, if you get odd -Agg and PNG
+ results, go to MiKTeX/Options and update your format files
+
+ * The fonts look terrible on screen. You are probably running Mac OS, and
+ there is some funny business with dvipng on the mac. Set text.dvipnghack :
+ True in your matplotlibrc file.
+
+ * On Ubuntu and Gentoo, the base texlive install does not ship with the
+ type1cm package. You may need to install some of the extra packages to get
+ all the goodies that come bundled with other latex distributions.
+
+ * Some progress has been made so Matplotlib uses the dvi files directly for
+ text layout. This allows latex to be used for text layout with the pdf and
+ svg backends, as well as the \*Agg and PS backends. In the future, a latex
+ installation may be the only external dependency.
+
+= In the event that things dont work =
+ * Try deleting `tex.cache` from your :envvar:`MATPLOTLIBDATA` directory
+
+ * Make sure LaTeX, dvipng and ghostscript are each working and on your PATH.
+
+ * Make sure what you are trying to do is possible in a LaTeX document, that
+ your LaTeX syntax is valid and that you are using raw strings if necessary
+ to avoid unintended escape sequences.
+
+ * Most problems reported on the mailing list have been cleared up by
+ upgrading Ghostscript_. If possible, please try upgrading to the latest
+ release before reporting problems to the list.
+
+ * The text.latex.preample rc setting is not officially supported. This option
+ provides lots of flexibility, and lots of ways to cause problems. Please
+ disable this option before reporting problems to the mailing list.
+
+ * If you still need help, please see :ref:`reporting-problems`
+
+.. _LaTeX: http://www.tug.org
+.. _dvipng: http://sourceforge.net/projects/dvipng
+.. _Ghostscript: http://www.cs.wisc.edu/~ghost/
+.. _PSNFSS: http://www.ctan.org/tex-archive/macros/latex/required/psnfss/psnfss2e.pdf
+.. _Poppler: http://poppler.freedesktop.org/
+.. _Xpdf: http://www.foolabs.com/xpdf
\ No newline at end of file
Modified: trunk/matplotlib/examples/pylab_examples/tex_demo.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/tex_demo.py 2008-06-08 02:25:39 UTC (rev 5422)
+++ trunk/matplotlib/examples/pylab_examples/tex_demo.py 2008-06-08 18:01:58 UTC (rev 5423)
@@ -17,7 +17,8 @@
rc('text', usetex=True)
-figure(1)
+rc('font', family='serif')
+figure(1, figsize=(6,4))
ax = axes([0.1, 0.1, 0.8, 0.7])
t = arange(0.0, 1.0+0.01, 0.01)
s = cos(2*2*pi*t)+2
Modified: trunk/matplotlib/examples/pylab_examples/tex_unicode_demo.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/tex_unicode_demo.py 2008-06-08 02:25:39 UTC (rev 5422)
+++ trunk/matplotlib/examples/pylab_examples/tex_unicode_demo.py 2008-06-08 18:01:58 UTC (rev 5423)
@@ -11,14 +11,13 @@
from matplotlib.pyplot import figure, axes, plot, xlabel, ylabel, title, \
grid, savefig, show
-figure(1)
+figure(1, figsize=(6,4))
ax = axes([0.1, 0.1, 0.8, 0.7])
t = arange(0.0, 1.0+0.01, 0.01)
s = cos(2*2*pi*t)+2
plot(t, s)
xlabel(r'\textbf{time (s)}')
-s = unicode(r'\textit{Velocity (\xB0/sec)}','latin-1')
ylabel(unicode(r'\textit{Velocity (\xB0/sec)}','latin-1'),fontsize=16)
title(r"\TeX\ is Number $\displaystyle\sum_{n=1}^\infty\frac{-e^{i\pi}}{2^n}$!",
fontsize=16, color='r')
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ef...@us...> - 2008-06-08 02:25:41
|
Revision: 5422
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5422&view=rev
Author: efiring
Date: 2008-06-07 19:25:39 -0700 (Sat, 07 Jun 2008)
Log Message:
-----------
Fix bug in Axes.scatter to make scatter-star_poly.py demo work
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/axes.py
trunk/matplotlib/lib/matplotlib/collections.py
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py 2008-06-08 01:50:33 UTC (rev 5421)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2008-06-08 02:25:39 UTC (rev 5422)
@@ -4602,7 +4602,7 @@
verts /= rescale
collection = mcoll.PolyCollection(
- verts, scales,
+ (verts,), scales,
facecolors = colors,
edgecolors = edgecolors,
linewidths = linewidths,
Modified: trunk/matplotlib/lib/matplotlib/collections.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/collections.py 2008-06-08 01:50:33 UTC (rev 5421)
+++ trunk/matplotlib/lib/matplotlib/collections.py 2008-06-08 02:25:39 UTC (rev 5422)
@@ -527,7 +527,7 @@
class BrokenBarHCollection(PolyCollection):
"""
- A colleciton of horizontal bars spanning yrange with a sequence of
+ A collection of horizontal bars spanning yrange with a sequence of
xranges
"""
def __init__(self, xranges, yrange, **kwargs):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ef...@us...> - 2008-06-08 01:50:34
|
Revision: 5421
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5421&view=rev
Author: efiring
Date: 2008-06-07 18:50:33 -0700 (Sat, 07 Jun 2008)
Log Message:
-----------
Fix bug in handling "close" option of Axes.fill
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/axes.py
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py 2008-06-08 01:49:09 UTC (rev 5420)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2008-06-08 01:50:33 UTC (rev 5421)
@@ -353,7 +353,7 @@
if self.command == 'plot':
func = makeline
else:
- closed = kwargs.pop("closed")
+ closed = kwargs.get('closed', True)
func = makefill
if multicol:
for j in range(y.shape[1]):
@@ -399,7 +399,7 @@
if self.command == 'plot':
func = makeline
else:
- closed = kwargs.pop('closed')
+ closed = kwargs.get('closed', True)
func = makefill
if multicol:
@@ -5812,7 +5812,7 @@
self.set_xscale('log')
elif orientation == 'vertical':
self.set_yscale('log')
-
+
fill = False
if histtype == 'stepfilled':
fill = True
@@ -5825,10 +5825,10 @@
x,y = y,x
elif orientation != 'vertical':
raise ValueError, 'invalid orientation: %s' % orientation
-
+
color = self._get_lines._get_next_cycle_color()
if fill:
- patches.append( self.fill(x, y,
+ patches.append( self.fill(x, y,
closed=False, facecolor=color) )
else:
patches.append( self.fill(x, y,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ef...@us...> - 2008-06-08 01:49:12
|
Revision: 5420
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5420&view=rev
Author: efiring
Date: 2008-06-07 18:49:09 -0700 (Sat, 07 Jun 2008)
Log Message:
-----------
Fix bug in last commit and in matplotlib.use
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/__init__.py
trunk/matplotlib/lib/matplotlib/rcsetup.py
Modified: trunk/matplotlib/lib/matplotlib/__init__.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/__init__.py 2008-06-08 01:23:21 UTC (rev 5419)
+++ trunk/matplotlib/lib/matplotlib/__init__.py 2008-06-08 01:49:09 UTC (rev 5420)
@@ -763,6 +763,7 @@
"""
if 'matplotlib.backends' in sys.modules:
if warn: warnings.warn(_use_error_msg)
+ return
arg = arg.lower()
be_parts = arg.split('.')
name = validate_backend(be_parts[0])
Modified: trunk/matplotlib/lib/matplotlib/rcsetup.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/rcsetup.py 2008-06-08 01:23:21 UTC (rev 5419)
+++ trunk/matplotlib/lib/matplotlib/rcsetup.py 2008-06-08 01:49:09 UTC (rev 5420)
@@ -12,10 +12,10 @@
from matplotlib.fontconfig_pattern import parse_fontconfig_pattern
from matplotlib.colors import is_color_like
-interactive_bk = ['GTK', 'GTKAgg', 'GTKCairo', 'FltkAgg', 'QtAgg', 'Qt4Agg',
- 'TkAgg', 'WX', 'WXAgg', 'CocoaAgg']
-non_interactive_bk = ['Agg', 'Cairo', 'EMF', 'GDK',
- 'Pdf', 'PS', 'SVG', 'Template']
+interactive_bk = ['gtk', 'gtkagg', 'gtkcairo', 'fltkagg', 'qtagg', 'qt4agg',
+ 'tkagg', 'wx', 'wxagg', 'cocoaagg']
+non_interactive_bk = ['agg', 'cairo', 'emv', 'gdk',
+ 'pdf', 'ps', 'svg', 'template']
all_backends = interactive_bk + non_interactive_bk
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ef...@us...> - 2008-06-08 01:23:25
|
Revision: 5419
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5419&view=rev
Author: efiring
Date: 2008-06-07 18:23:21 -0700 (Sat, 07 Jun 2008)
Log Message:
-----------
List backends only in rcsetup
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/examples/tests/backend_driver.py
trunk/matplotlib/lib/matplotlib/__init__.py
trunk/matplotlib/lib/matplotlib/backends/__init__.py
trunk/matplotlib/lib/matplotlib/rcsetup.py
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2008-06-07 21:51:26 UTC (rev 5418)
+++ trunk/matplotlib/CHANGELOG 2008-06-08 01:23:21 UTC (rev 5419)
@@ -1,4 +1,8 @@
-2008-06-06 hist() revision, applied ideas proposed by Erik Tollerud and
+2008=06-07 Moved list of backends to rcsetup.py; made use of lower
+ case for backend names consistent; use validate_backend
+ when importing backends subpackage - EF
+
+2008-06-06 hist() revision, applied ideas proposed by Erik Tollerud and
Olle Engdegard: make histtype='step' unfilled by default
and introduce histtype='stepfilled'; use default color
cycle; introduce reverse cumulative histogram; new align
Modified: trunk/matplotlib/examples/tests/backend_driver.py
===================================================================
--- trunk/matplotlib/examples/tests/backend_driver.py 2008-06-07 21:51:26 UTC (rev 5418)
+++ trunk/matplotlib/examples/tests/backend_driver.py 2008-06-08 01:23:21 UTC (rev 5419)
@@ -17,9 +17,10 @@
from __future__ import division
import os, time, sys, glob
-import matplotlib.backends as mplbe
-all_backends = [b.lower() for b in mplbe.all_backends]
+import matplotlib.rcsetup as rcsetup
+
+all_backends = list(rcsetup.all_backends) # to leave the original list alone
all_backends.extend(['cairo.png', 'cairo.ps', 'cairo.pdf', 'cairo.svg'])
pylab_dir = os.path.join('..', 'pylab_examples')
@@ -189,7 +190,7 @@
line_lstrip.startswith('show')):
continue
tmpfile.write(line)
- if backend in mplbe.interactive_bk:
+ if backend in rcsetup.interactive_bk:
tmpfile.write('show()')
else:
tmpfile.write('savefig("%s", dpi=150)' % outfile)
@@ -205,12 +206,13 @@
if __name__ == '__main__':
times = {}
- default_backends = ['Agg', 'PS', 'SVG', 'PDF', 'Template']
+ default_backends = ['agg', 'ps', 'svg', 'pdf', 'template']
if len(sys.argv)==2 and sys.argv[1]=='--clean':
localdirs = [d for d in glob.glob('*') if os.path.isdir(d)]
all_backends_set = set(all_backends)
for d in localdirs:
- if d.lower() not in all_backends_set: continue
+ if d.lower() not in all_backends_set:
+ continue
print 'removing %s'%d
for fname in glob.glob(os.path.join(d, '*')):
os.remove(fname)
Modified: trunk/matplotlib/lib/matplotlib/__init__.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/__init__.py 2008-06-07 21:51:26 UTC (rev 5418)
+++ trunk/matplotlib/lib/matplotlib/__init__.py 2008-06-08 01:23:21 UTC (rev 5419)
@@ -763,14 +763,15 @@
"""
if 'matplotlib.backends' in sys.modules:
if warn: warnings.warn(_use_error_msg)
+ arg = arg.lower()
be_parts = arg.split('.')
name = validate_backend(be_parts[0])
rcParams['backend'] = name
- if name == 'Cairo' and len(be_parts) > 1:
+ if name == 'cairo' and len(be_parts) > 1:
rcParams['cairo.format'] = validate_cairo_format(be_parts[1])
def get_backend():
- return rcParams['backend']
+ return rcParams['backend'].lower()
def interactive(b):
"""
Modified: trunk/matplotlib/lib/matplotlib/backends/__init__.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/__init__.py 2008-06-07 21:51:26 UTC (rev 5418)
+++ trunk/matplotlib/lib/matplotlib/backends/__init__.py 2008-06-08 01:23:21 UTC (rev 5419)
@@ -1,25 +1,19 @@
-import sys
+
import matplotlib
-import time
+from matplotlib.rcsetup import interactive_bk
+from matplotlib.rcsetup import validate_backend
__all__ = ['backend','show','draw_if_interactive',
'new_figure_manager', 'backend_version']
-interactive_bk = ['GTK', 'GTKAgg', 'GTKCairo', 'FltkAgg', 'QtAgg', 'Qt4Agg',
- 'TkAgg', 'WX', 'WXAgg', 'CocoaAgg']
-non_interactive_bk = ['Agg2', 'Agg', 'Cairo', 'EMF', 'GDK',
- 'Pdf', 'PS', 'SVG', 'Template']
-all_backends = interactive_bk + non_interactive_bk
+backend = matplotlib.get_backend() # makes sure it is lower case
+validate_backend(backend)
-backend = matplotlib.get_backend()
-if backend not in all_backends:
- raise ValueError, 'Unrecognized backend %s' % backend
-
def pylab_setup():
'return new_figure_manager, draw_if_interactive and show for pylab'
# Import the requested backend into a generic module object
- backend_name = 'backend_'+backend.lower()
+ backend_name = 'backend_'+backend
backend_mod = __import__('matplotlib.backends.'+backend_name,
globals(),locals(),[backend_name])
@@ -42,7 +36,7 @@
# Additional imports which only happen for certain backends. This section
# should probably disappear once all backends are uniform.
- if backend in ['WX','WXAgg']:
+ if backend in ['wx','wxagg']:
Toolbar = backend_mod.Toolbar
__all__.append('Toolbar')
Modified: trunk/matplotlib/lib/matplotlib/rcsetup.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/rcsetup.py 2008-06-07 21:51:26 UTC (rev 5418)
+++ trunk/matplotlib/lib/matplotlib/rcsetup.py 2008-06-08 01:23:21 UTC (rev 5419)
@@ -12,6 +12,13 @@
from matplotlib.fontconfig_pattern import parse_fontconfig_pattern
from matplotlib.colors import is_color_like
+interactive_bk = ['GTK', 'GTKAgg', 'GTKCairo', 'FltkAgg', 'QtAgg', 'Qt4Agg',
+ 'TkAgg', 'WX', 'WXAgg', 'CocoaAgg']
+non_interactive_bk = ['Agg', 'Cairo', 'EMF', 'GDK',
+ 'Pdf', 'PS', 'SVG', 'Template']
+all_backends = interactive_bk + non_interactive_bk
+
+
class ValidateInStrings:
def __init__(self, key, valid, ignorecase=False):
'valid is a list of legal strings'
@@ -80,11 +87,7 @@
raise ValueError('Supported Postscript/PDF font types are %s' % fonttypes.values())
return fonttype
-validate_backend = ValidateInStrings('backend',[
- 'Agg2', 'Agg', 'Aqt', 'Cairo', 'CocoaAgg', 'EMF', 'GD', 'GDK',
- 'GTK', 'GTKAgg', 'GTKCairo', 'FltkAgg', 'Paint', 'Pdf', 'PS',
- 'QtAgg', 'Qt4Agg', 'SVG', 'Template', 'TkAgg', 'WX', 'WXAgg',
- ], ignorecase=True)
+validate_backend = ValidateInStrings('backend', all_backends, ignorecase=True)
validate_numerix = ValidateInStrings('numerix',[
'Numeric','numarray','numpy',
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ds...@us...> - 2008-06-07 21:51:29
|
Revision: 5418
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5418&view=rev
Author: dsdale
Date: 2008-06-07 14:51:26 -0700 (Sat, 07 Jun 2008)
Log Message:
-----------
documentation updates
Modified Paths:
--------------
trunk/matplotlib/doc/devel/documenting_mpl.rst
Modified: trunk/matplotlib/doc/devel/documenting_mpl.rst
===================================================================
--- trunk/matplotlib/doc/devel/documenting_mpl.rst 2008-06-07 21:45:36 UTC (rev 5417)
+++ trunk/matplotlib/doc/devel/documenting_mpl.rst 2008-06-07 21:51:26 UTC (rev 5418)
@@ -62,11 +62,11 @@
* Mathematical expressions can be rendered as png images in html, and in
the usual way by latex. For example:
- ``math:`sin(x_n^2)`` yields: :math:`sin(x_n^2)`, and::
+ ``math:`sin(x_n^2)``` yields: :math:`sin(x_n^2)`, and::
- .. math::
+ .. math::
- \int_{-\infty}^{\infty}\frac{e^{i\phi}}{1+x^2\frac{e^{i\phi}}{1+x^2}}``
+ \int_{-\infty}^{\infty}\frac{e^{i\phi}}{1+x^2\frac{e^{i\phi}}{1+x^2}}
yields:
@@ -93,7 +93,7 @@
Figures
=======
-Each guide will have its own figures directory for scripts to generate images
+Each guide will have its own `figures/` directory for scripts to generate images
to be included in the dcoumentation. It is not necessary to explicitly save
the figure in the script, a figure will be saved with the same name as the
filename when the documentation is generated.
@@ -111,13 +111,13 @@
==========================
In the documentation, you may want to include to a document in the
-matplotlib src, eg a license file, an image file from `mpl-data`, or an
+matplotlib src, e.g. a license file, an image file from `mpl-data`, or an
example. When you include these files, include them using a symbolic
link from the documentation parent directory. This way, if we
relocate the mpl documentation directory, all of the internal pointers
to files will not have to change, just the top level symlinks. For
example, In the top level doc directory we have symlinks pointing to
-the mpl ``examples`` and ``mpl-data``::
+the mpl `examples` and `mpl-data`::
home:~/mpl/doc2> ls -l mpl_*
mpl_data -> ../lib/matplotlib/mpl-data
@@ -126,7 +126,7 @@
In the `users` subdirectory, if I want to refer to a file in the mpl-data
directory, I use the symlink directory. For example, from
-``customizing.rst``::
+`customizing.rst`::
.. literalinclude:: ../mpl_data/matplotlibrc
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ds...@us...> - 2008-06-07 21:45:38
|
Revision: 5417
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5417&view=rev
Author: dsdale
Date: 2008-06-07 14:45:36 -0700 (Sat, 07 Jun 2008)
Log Message:
-----------
fix some formatting in documentation guide
Modified Paths:
--------------
trunk/matplotlib/doc/devel/documenting_mpl.rst
Modified: trunk/matplotlib/doc/devel/documenting_mpl.rst
===================================================================
--- trunk/matplotlib/doc/devel/documenting_mpl.rst 2008-06-07 21:41:51 UTC (rev 5416)
+++ trunk/matplotlib/doc/devel/documenting_mpl.rst 2008-06-07 21:45:36 UTC (rev 5417)
@@ -31,7 +31,7 @@
arguments to build everything.
The output produced by Sphinx can be configured by editing the `conf.py`
-file located in the `doc\`.
+file located in the `doc/`.
Organization of Matplotlib's Documentation
==========================================
@@ -81,9 +81,9 @@
In [69]: lines = plot([1,2,3])
-which would yield::
+ which would yield:
-.. sourcecode:: ipython
+ .. sourcecode:: ipython
In [69]: lines = plot([1,2,3])
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ds...@us...> - 2008-06-07 21:41:54
|
Revision: 5416
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5416&view=rev
Author: dsdale
Date: 2008-06-07 14:41:51 -0700 (Sat, 07 Jun 2008)
Log Message:
-----------
updated documentation guide
Modified Paths:
--------------
trunk/matplotlib/doc/devel/documenting_mpl.rst
Added Paths:
-----------
trunk/matplotlib/doc/static_figs/
trunk/matplotlib/doc/static_figs/README
Modified: trunk/matplotlib/doc/devel/documenting_mpl.rst
===================================================================
--- trunk/matplotlib/doc/devel/documenting_mpl.rst 2008-06-07 21:02:24 UTC (rev 5415)
+++ trunk/matplotlib/doc/devel/documenting_mpl.rst 2008-06-07 21:41:51 UTC (rev 5416)
@@ -4,6 +4,9 @@
Documenting Matplotlib
**********************
+Getting Started
+===============
+
The documentation for matplotlib is generated from ReStructured Text
using the Sphinx_ documentation generation tool. Sphinx-0.4 or later
is required. Currently this means we need to install from the svn
@@ -15,56 +18,100 @@
.. _Sphinx: http://sphinx.pocoo.org/
-The documentation sources are found in the doc/ directory in the trunk.
-To build the users guid in html format, cd into doc/users_guide and do::
+The documentation sources are found in the `doc/` directory in the trunk.
+To build the users guide in html format, cd into `doc/users_guide` and do::
python make.py html
+or::
+
+ ./make.py html
+
you can also pass a ``latex`` flag to make.py to build a pdf, or pass no
-arguments to build everything. The same procedure can be followed for
-the sources in doc/api_reference.
+arguments to build everything.
-The actual ReStructured Text files are kept in doc/users_guide/source
-and doc/api_reference/source. The main entry point is index.rst.
-Additional files can be added by including their base file name
-(dropping the .rst extension) in the table of contents. It is also
-possible to include other documents through the use of an include
-statement. For example, in the Developers Guide, index.rst lists
-coding_guide, which automatically inserts coding_guide.rst.
+The output produced by Sphinx can be configured by editing the `conf.py`
+file located in the `doc\`.
-Sphinx does not support tables with column- or row-spanning cells for
-latex output. Such tables can not be used when documenting matplotlib.
+Organization of Matplotlib's Documentation
+==========================================
-Mathematical expressions can be rendered as png images in html, and in
-the usual way by latex. For example:
+The actual ReStructured Text files are kept in `doc/users`, `doc/devel`,
+`doc/api` and `doc/faq`. The main entry point is `doc/index.rst`, which pulls
+in the `index.rst` file for the users guide, developers guide, api reference,
+and faqs. The documentation suite is built as a single document in order to
+make the most effective use of cross referencing, we want to make navigating
+the Matplotlib documentation as easy as possible.
-``math:`sin(x_n^2)`` yields: :math:`sin(x_n^2)`, and::
+Additional files can be added to the various guides by including their base
+file name (the .rst extension is not necessary) in the table of contents.
+It is also possible to include other documents through the use of an include
+statement, such as::
+ .. include:: ../../TODO
+
+Formatting
+==========
+
+The Sphinx website contains plenty of documentation_ concerning ReST markup and
+working with Sphinx in general. Here are a few additional things to keep in mind:
+
+* Sphinx does not support tables with column- or row-spanning cells for
+ latex output. Such tables can not be used when documenting matplotlib.
+
+* Mathematical expressions can be rendered as png images in html, and in
+ the usual way by latex. For example:
+
+ ``math:`sin(x_n^2)`` yields: :math:`sin(x_n^2)`, and::
+
.. math::
\int_{-\infty}^{\infty}\frac{e^{i\phi}}{1+x^2\frac{e^{i\phi}}{1+x^2}}``
-yields:
+ yields:
-.. math::
+ .. math::
- \int_{-\infty}^{\infty}\frac{e^{i\phi}}{1+x^2\frac{e^{i\phi}}{1+x^2}}
+ \int_{-\infty}^{\infty}\frac{e^{i\phi}}{1+x^2\frac{e^{i\phi}}{1+x^2}}
-The output produced by Sphinx can be configured by editing the conf.py
-files located in the documentation source directories.
+* Interactive IPython sessions can be illustrated in the documentation using
+ the following directive::
-The Sphinx website contains plenty of documentation_ concerning ReST
-markup and working with Sphinx in general.
+ .. sourcecode:: ipython
+ In [69]: lines = plot([1,2,3])
+
+which would yield::
+
+.. sourcecode:: ipython
+
+ In [69]: lines = plot([1,2,3])
+
.. _documentation: http://sphinx.pocoo.org/contents.html
+
+Figures
+=======
+
+Each guide will have its own figures directory for scripts to generate images
+to be included in the dcoumentation. It is not necessary to explicitly save
+the figure in the script, a figure will be saved with the same name as the
+filename when the documentation is generated.
+
+Any figures that rely on optional system configurations should be generated
+with a script residing in doc/static_figs. The resulting figures will be saved
+to doc/_static, and will be named based on the name of the script, so we can
+avoid unintentionally overwriting any existing figures. Please add a line to
+the README in doc/static-figs for any additional requirements necessary to
+generate a new figure.
+
.. _referring-to-mpl-docs:
Referring to mpl documents
==========================
In the documentation, you may want to include to a document in the
-matplotlib src, eg a license file, an image file from ``mpl-data``, or an
+matplotlib src, eg a license file, an image file from `mpl-data`, or an
example. When you include these files, include them using a symbolic
link from the documentation parent directory. This way, if we
relocate the mpl documentation directory, all of the internal pointers
@@ -77,7 +124,9 @@
mpl_examples -> ../examples
-In the ``users`` subdirectory, if I want to refer to a file in the mpl-data directory, I use the symlink direcotry. For example, from ``customizing.rst``::
+In the `users` subdirectory, if I want to refer to a file in the mpl-data
+directory, I use the symlink directory. For example, from
+``customizing.rst``::
.. literalinclude:: ../mpl_data/matplotlibrc
@@ -107,7 +156,8 @@
.. _faq-backend
-In addition, since underscores are widely used by Sphinx itself, let's prefer hyphens to separate words.
+In addition, since underscores are widely used by Sphinx itself, let's prefer
+hyphens to separate words.
.. _emacs-helpers:
Added: trunk/matplotlib/doc/static_figs/README
===================================================================
--- trunk/matplotlib/doc/static_figs/README (rev 0)
+++ trunk/matplotlib/doc/static_figs/README 2008-06-07 21:41:51 UTC (rev 5416)
@@ -0,0 +1,4 @@
+Scripts that require optional system configurations to generate scripts should go here. The
+figures will be generated in doc/_static, and will be named based on the name of the script,
+so we can avoid unintentionally overwriting any existing figures. Please add a line to this
+file for any additional requirements necessary to generate a new figure.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ds...@us...> - 2008-06-07 21:02:26
|
Revision: 5415
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5415&view=rev
Author: dsdale
Date: 2008-06-07 14:02:24 -0700 (Sat, 07 Jun 2008)
Log Message:
-----------
updated doc outline
Modified Paths:
--------------
trunk/matplotlib/doc/devel/outline.rst
Modified: trunk/matplotlib/doc/devel/outline.rst
===================================================================
--- trunk/matplotlib/doc/devel/outline.rst 2008-06-07 20:49:18 UTC (rev 5414)
+++ trunk/matplotlib/doc/devel/outline.rst 2008-06-07 21:02:24 UTC (rev 5415)
@@ -15,13 +15,13 @@
contouring Eric ? no author Perry ?
quiver plots Eric ? no author ?
quadmesh ? no author ?
-images ? no author ?
+images ? no author Darren
histograms Manuel ? no author Erik Tollerud ?
bar / errorbar ? no author ?
-x-y plots ? no author ?
+x-y plots ? no author Darren
time series plots ? no author ?
date plots John has author ?
-working with data John has author ?
+working with data John has author Darren
custom ticking ? no author ?
masked data Eric ? no author ?
text ? no author ?
@@ -30,12 +30,12 @@
animation John has author ?
collections ? no author ?
mathtext Michael ? submitted John
-fonts et al Michael ? no author ?
+fonts et al Michael ? no author Darren
pyplot tut John submitted Eric ?
usetex Darren has author ?
configuration Darren preliminary ?
colormapping Perry ? no author Eric ?
-win32 install Charlie ? no author ?
+win32 install Charlie ? no author Darren
os x install Charlie ? no author ?
linux install Darren has author ?
artist api John submitted ?
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ds...@us...> - 2008-06-07 20:49:21
|
Revision: 5414
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5414&view=rev
Author: dsdale
Date: 2008-06-07 13:49:18 -0700 (Sat, 07 Jun 2008)
Log Message:
-----------
updated outline
Modified Paths:
--------------
trunk/matplotlib/doc/devel/outline.rst
Modified: trunk/matplotlib/doc/devel/outline.rst
===================================================================
--- trunk/matplotlib/doc/devel/outline.rst 2008-06-06 18:19:53 UTC (rev 5413)
+++ trunk/matplotlib/doc/devel/outline.rst 2008-06-07 20:49:18 UTC (rev 5414)
@@ -32,12 +32,12 @@
mathtext Michael ? submitted John
fonts et al Michael ? no author ?
pyplot tut John submitted Eric ?
-usetex Darren ? no author ?
-configuration Darren ? preliminary ?
+usetex Darren has author ?
+configuration Darren preliminary ?
colormapping Perry ? no author Eric ?
win32 install Charlie ? no author ?
os x install Charlie ? no author ?
-linux install ? no author ?
+linux install Darren has author ?
artist api John submitted ?
event handling John submitted ?
navigation John submitted ?
@@ -46,9 +46,9 @@
ui - gtk ? no author ?
ui - wx ? no author ?
ui - tk ? no author ?
-ui - qt Darren ? no author ?
+ui - qt Darren has author ?
backend - pdf Jouni ? no author ?
-backend - ps Darren ? no author ?
+backend - ps Darren has author ?
backend - svg ? no author ?
backend - agg ? no author ?
backend - cairo ? no author ?
@@ -64,7 +64,8 @@
the artist John has author ?
transforms Michael submitted John
documenting mpl Darren submitted ?
-coding guide John submitted ?
+coding guide John submitted Eric (Darren
+suggests)?
and_much_more ? ? ?
=============================== ==================== =========== ===================
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2008-06-06 18:19:56
|
Revision: 5413
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5413&view=rev
Author: jswhit
Date: 2008-06-06 11:19:53 -0700 (Fri, 06 Jun 2008)
Log Message:
-----------
fix typos
Modified Paths:
--------------
trunk/toolkits/basemap/examples/fcstmaps.py
Modified: trunk/toolkits/basemap/examples/fcstmaps.py
===================================================================
--- trunk/toolkits/basemap/examples/fcstmaps.py 2008-06-06 16:57:06 UTC (rev 5412)
+++ trunk/toolkits/basemap/examples/fcstmaps.py 2008-06-06 18:19:53 UTC (rev 5413)
@@ -12,8 +12,7 @@
if len(sys.argv) > 1:
YYYYMMDD = sys.argv[1]
else:
- YYYYMMDD = datetime.datetime.today().strftime('%Y%m%d')
-YYYYMM = YYYYMMDD[0:6]
+ YYYYMMDD = datetime.datetime.today().strftime('%Y%m%d')
# set OpenDAP server URL.
URLbase="http://nomad3.ncep.noaa.gov:9090/dods/mrf/mrf"
@@ -24,7 +23,7 @@
except:
msg = """
opendap server not providing the requested data.
-Try another date by providing YYYYMM on command line."""
+Try another date by providing YYYYMMDD on command line."""
raise IOError, msg
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2008-06-06 16:57:21
|
Revision: 5412
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5412&view=rev
Author: mdboom
Date: 2008-06-06 09:57:06 -0700 (Fri, 06 Jun 2008)
Log Message:
-----------
Fix callbacks accumulating bug by using a ScaledTranslation rather
than a callback on dpi change.
Fix ScaledTranslation.__repr__
(Thanks Stan West for tracking down and fixing these issues).
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/axes.py
trunk/matplotlib/lib/matplotlib/transforms.py
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py 2008-06-06 16:34:00 UTC (rev 5411)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2008-06-06 16:57:06 UTC (rev 5412)
@@ -827,8 +827,8 @@
props = font_manager.FontProperties(size=rcParams['axes.titlesize'])
- self.titleOffsetTrans = mtransforms.Affine2D().translate(
- 0.0, 5.0*self.figure.dpi/72.)
+ self.titleOffsetTrans = mtransforms.ScaledTranslation(
+ 0.0, 5.0 / 72.0, self.figure.dpi_scale_trans)
self.title = mtext.Text(
x=0.5, y=1.0, text='',
fontproperties=props,
@@ -859,17 +859,7 @@
self.xaxis.set_clip_path(self.axesPatch)
self.yaxis.set_clip_path(self.axesPatch)
- self.titleOffsetTrans.clear().translate(
- 0.0, 5.0*self.figure.dpi/72.)
- def on_dpi_change(fig):
- self.titleOffsetTrans.clear().translate(
- 0.0, 5.0*fig.dpi/72.)
-
- self.figure.callbacks.connect('dpi_changed', on_dpi_change)
-
-
-
def clear(self):
'clear the axes'
self.cla()
Modified: trunk/matplotlib/lib/matplotlib/transforms.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/transforms.py 2008-06-06 16:34:00 UTC (rev 5411)
+++ trunk/matplotlib/lib/matplotlib/transforms.py 2008-06-06 16:57:06 UTC (rev 5412)
@@ -2043,7 +2043,7 @@
self._inverted = None
def __repr__(self):
- return "ScaledTranslation(%s)" % (self._t)
+ return "ScaledTranslation(%s)" % (self._t,)
__str__ = __repr__
def get_matrix(self):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|