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: <ef...@us...> - 2009-08-29 18:14:45
|
Revision: 7585
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7585&view=rev
Author: efiring
Date: 2009-08-29 18:14:28 +0000 (Sat, 29 Aug 2009)
Log Message:
-----------
Merged revisions 7582-7584 via svnmerge from
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_99_maint
........
r7582 | jdh2358 | 2009-08-29 06:35:35 -1000 (Sat, 29 Aug 2009) | 1 line
added Michael Sarahan's image tutorial from the scipy mpl sprint
........
r7583 | jdh2358 | 2009-08-29 06:46:44 -1000 (Sat, 29 Aug 2009) | 1 line
minor tweaks to the image tut
........
r7584 | efiring | 2009-08-29 07:48:37 -1000 (Sat, 29 Aug 2009) | 2 lines
Semilogx, semilogy ensure one axis is linear; patch by Tony Yu
........
Modified Paths:
--------------
trunk/matplotlib/doc/_templates/indexsidebar.html
trunk/matplotlib/doc/_templates/layout.html
trunk/matplotlib/doc/devel/coding_guide.rst
trunk/matplotlib/doc/users/index.rst
trunk/matplotlib/doc/users/transforms_tutorial.rst
trunk/matplotlib/doc/users/whats_new.rst
trunk/matplotlib/lib/matplotlib/axes.py
Added Paths:
-----------
trunk/matplotlib/doc/_static/stinkbug.png
trunk/matplotlib/doc/users/image_tutorial.rst
Property Changed:
----------------
trunk/matplotlib/
trunk/matplotlib/doc/pyplots/README
trunk/matplotlib/doc/sphinxext/gen_gallery.py
trunk/matplotlib/doc/sphinxext/gen_rst.py
trunk/matplotlib/examples/misc/multiprocess.py
trunk/matplotlib/examples/mplot3d/contour3d_demo.py
trunk/matplotlib/examples/mplot3d/contourf3d_demo.py
trunk/matplotlib/examples/mplot3d/polys3d_demo.py
trunk/matplotlib/examples/mplot3d/scatter3d_demo.py
trunk/matplotlib/examples/mplot3d/surface3d_demo.py
trunk/matplotlib/examples/mplot3d/wire3d_demo.py
trunk/matplotlib/lib/matplotlib/sphinxext/mathmpl.py
trunk/matplotlib/lib/matplotlib/sphinxext/only_directives.py
trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py
Property changes on: trunk/matplotlib
___________________________________________________________________
Modified: svnmerge-integrated
- /branches/mathtex:1-7263 /branches/v0_98_5_maint:1-7253 /branches/v0_99_maint:1-7569
+ /branches/mathtex:1-7263 /branches/v0_98_5_maint:1-7253 /branches/v0_99_maint:1-7584
Modified: svn:mergeinfo
- /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569
+ /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584
Copied: trunk/matplotlib/doc/_static/stinkbug.png (from rev 7584, branches/v0_99_maint/doc/_static/stinkbug.png)
===================================================================
(Binary files differ)
Modified: trunk/matplotlib/doc/_templates/indexsidebar.html
===================================================================
--- trunk/matplotlib/doc/_templates/indexsidebar.html 2009-08-29 17:48:37 UTC (rev 7584)
+++ trunk/matplotlib/doc/_templates/indexsidebar.html 2009-08-29 18:14:28 UTC (rev 7585)
@@ -53,7 +53,7 @@
but it is a good idea to ping us on the mailing list too.</p>
<p>For details on what's new, see the detailed <a href="{{
-pathto('_static/CHANGELOG', 1) }}">changelog</a>. Anything that could
+pathto('_static/CHANGELOG', 1) }}">changelog</a> or browse the <a href="http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/matplotlib/">source code</a>. Anything that could
require changes to your existing codes is logged in the <a href="{{
pathto('api/api_changes.html', 1) }}">api changes</a> file.</p>
Modified: trunk/matplotlib/doc/_templates/layout.html
===================================================================
--- trunk/matplotlib/doc/_templates/layout.html 2009-08-29 17:48:37 UTC (rev 7584)
+++ trunk/matplotlib/doc/_templates/layout.html 2009-08-29 18:14:28 UTC (rev 7585)
@@ -4,7 +4,7 @@
{% block rootrellink %}
<li><a href="{{ pathto('index') }}">home</a>| </li>
<li><a href="{{ pathto('search') }}">search</a>| </li>
- <li><a href="examples/index.html">examples</a>| </li>
+ <li><a href="http://matplotlib.sf.net/examples/index.html">examples</a>| </li>
<li><a href="{{ pathto('gallery') }}">gallery</a>| </li>
<li><a href="{{ pathto('contents') }}">docs</a> »</li>
{% endblock %}
Modified: trunk/matplotlib/doc/devel/coding_guide.rst
===================================================================
--- trunk/matplotlib/doc/devel/coding_guide.rst 2009-08-29 17:48:37 UTC (rev 7584)
+++ trunk/matplotlib/doc/devel/coding_guide.rst 2009-08-29 18:14:28 UTC (rev 7585)
@@ -1,4 +1,4 @@
-M.. _coding-guide:
+.. _coding-guide:
************
Coding guide
Property changes on: trunk/matplotlib/doc/pyplots/README
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/doc/pyplots/README:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569
+ /branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/doc/pyplots/README:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584
Property changes on: trunk/matplotlib/doc/sphinxext/gen_gallery.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/doc/sphinxext/gen_gallery.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569
+ /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/doc/sphinxext/gen_gallery.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584
Property changes on: trunk/matplotlib/doc/sphinxext/gen_rst.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/doc/sphinxext/gen_rst.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569
+ /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/doc/sphinxext/gen_rst.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584
Copied: trunk/matplotlib/doc/users/image_tutorial.rst (from rev 7584, branches/v0_99_maint/doc/users/image_tutorial.rst)
===================================================================
--- trunk/matplotlib/doc/users/image_tutorial.rst (rev 0)
+++ trunk/matplotlib/doc/users/image_tutorial.rst 2009-08-29 18:14:28 UTC (rev 7585)
@@ -0,0 +1,324 @@
+.. _image_tutorial:
+
+
+**************
+Image tutorial
+**************
+
+.. _imaging_startup:
+
+Startup commands
+===================
+
+At the very least, you'll need to have access to the :func:`~matplotlib.pyplot.imshow` function. There are a couple of ways to do it. The easy way for an interactive environment::
+
+ $ipython -pylab
+
+The imshow function is now directly accessible (it's in your
+`namespace <http://bytebaker.com/2008/07/30/python-namespaces/>`_).
+See also :ref:`pyplot-tutorial`.
+
+The more expressive, easier to understand later method (use this in
+your scripts to make it easier for others (including your future self)
+to read) is to use the matplotlib API (see :ref:`artist-tutorial`) where you use explicit namespaces and control object creation, etc...
+
+.. sourcecode:: ipython
+
+ In [1]: import matplotlib.pyplot as plt
+ In [2]: import matplotlib.image as mpimg
+ In [3]: import numpy as np
+
+Examples below will use the latter method, for clarity. In these examples, if you use the -pylab method, you can skip the "mpimg." and "plt." prefixes.
+
+.. _importing_data:
+
+Importing image data into Numpy arrays
+===============================================
+
+Plotting image data is supported by the Python Image Library (`PIL <http://www.pythonware.com/products/pil/>`_), . Natively, matplotlib only supports PNG images. The commands shown below fall back on PIL if the native read fails.
+
+The image used in this example is a PNG file, but keep that PIL requirement in mind for your own data.
+
+Here's the image we're going to play with:
+
+.. image:: ../_static/stinkbug.png
+
+It's a 24-bit RGB PNG image (8 bits for each of R, G, B). Depending
+on where you get your data, the other kinds of image that you'll most
+likely encounter are RGBA images, which allow for transparency, or
+single-channel grayscale (luminosity) images. You can right click on
+it and choose "Save image as" to download it to your computer for the
+rest of this tutorial.
+
+And here we go...
+
+.. sourcecode:: ipython
+
+ In [4]: img=mpimg.imread('stinkbug.png')
+ Out[4]:
+ array([[[ 0.40784314, 0.40784314, 0.40784314],
+ [ 0.40784314, 0.40784314, 0.40784314],
+ [ 0.40784314, 0.40784314, 0.40784314],
+ ...,
+ [ 0.42745098, 0.42745098, 0.42745098],
+ [ 0.42745098, 0.42745098, 0.42745098],
+ [ 0.42745098, 0.42745098, 0.42745098]],
+
+ [[ 0.41176471, 0.41176471, 0.41176471],
+ [ 0.41176471, 0.41176471, 0.41176471],
+ [ 0.41176471, 0.41176471, 0.41176471],
+ ...,
+ [ 0.42745098, 0.42745098, 0.42745098],
+ [ 0.42745098, 0.42745098, 0.42745098],
+ [ 0.42745098, 0.42745098, 0.42745098]],
+
+ [[ 0.41960785, 0.41960785, 0.41960785],
+ [ 0.41568628, 0.41568628, 0.41568628],
+ [ 0.41568628, 0.41568628, 0.41568628],
+ ...,
+ [ 0.43137255, 0.43137255, 0.43137255],
+ [ 0.43137255, 0.43137255, 0.43137255],
+ [ 0.43137255, 0.43137255, 0.43137255]],
+
+ ...,
+ [[ 0.43921569, 0.43921569, 0.43921569],
+ [ 0.43529412, 0.43529412, 0.43529412],
+ [ 0.43137255, 0.43137255, 0.43137255],
+ ...,
+ [ 0.45490196, 0.45490196, 0.45490196],
+ [ 0.4509804 , 0.4509804 , 0.4509804 ],
+ [ 0.4509804 , 0.4509804 , 0.4509804 ]],
+
+ [[ 0.44313726, 0.44313726, 0.44313726],
+ [ 0.44313726, 0.44313726, 0.44313726],
+ [ 0.43921569, 0.43921569, 0.43921569],
+ ...,
+ [ 0.4509804 , 0.4509804 , 0.4509804 ],
+ [ 0.44705883, 0.44705883, 0.44705883],
+ [ 0.44705883, 0.44705883, 0.44705883]],
+
+ [[ 0.44313726, 0.44313726, 0.44313726],
+ [ 0.4509804 , 0.4509804 , 0.4509804 ],
+ [ 0.4509804 , 0.4509804 , 0.4509804 ],
+ ...,
+ [ 0.44705883, 0.44705883, 0.44705883],
+ [ 0.44705883, 0.44705883, 0.44705883],
+ [ 0.44313726, 0.44313726, 0.44313726]]], dtype=float32)
+
+Note the dtype there - float32. Matplotlib has rescaled the 8 bit data from each channel to floating point data between 0.0 and 1.0. As a side note, the only datatype that PIL can work with is uint8. Matplotlib plotting can handle float32 and uint8, but image reading/writing for any format other than PNG is limited to uint8 data. Why 8 bits? Most displays can only render 8 bits per channel worth of color gradation. Why can they only render 8 bits/channel? Because that's about all the human eye can see. More here (from a photography standpoint): `Luminous Landscape bit depth tutorial <http://www.luminous-landscape.com/tutorials/bit-depth.shtml>`_
+
+Each inner list represents a pixel. Here, with an RGB image, there are 3 values. Since it's a black and white image, R, G, and B are all similar. An RGBA (where A is alpha, or transparency), has 4 values per inner list, and a simple luminance image just has one value (and is thus only a 2-D array, not a 3-D array). For RGB and RGBA images, matplotlib supports float32 and uint8 data types. For grayscale, matplotlib supports only float32. If your array data does not meet one of these descriptions, you need to rescale it.
+
+.. _plotting_data:
+
+Plotting numpy arrays as images
+===================================
+
+So, you have your data in a numpy array (either by importing it, or by generating it). Let's render it. In Matplotlib, this is performed using the :func:`~matplotlib.pyplot.imshow` function. Here we'll grab the plot object. This object gives you an easy way to manipulate the plot from the prompt.
+
+.. sourcecode:: ipython
+
+ In [5]: imgplot = plt.imshow(img)
+
+.. plot::
+
+ import matplotlib.pyplot as plt
+ import matplotlib.image as mpimg
+ import numpy as np
+ img = mpimg.imread('_static/stinkbug.png')
+ imgplot = plt.imshow(img)
+
+You can also plot any numpy array - just remember that the datatype must be float32 (and range from 0.0 to 1.0) or uint8.
+
+.. _Pseudocolor:
+
+Applying pseudocolor schemes to image plots
+-------------------------------------------------
+
+Pseudocolor can be a useful tool for enhancing contrast and visualizing your data more easily. This is especially useful when making presentations of your data using projectors - their contrast is typically quite poor.
+
+Pseudocolor is only relevant to single-channel, grayscale, luminosity images. We currently have an RGB image. Since R, G, and B are all similar (see for yourself above or in your data), we can just pick on channel of our data:
+
+.. sourcecode:: ipython
+
+ In [6]: lum_img = img[:,:,0]
+
+This is array slicing. You can read more `here <http://www.scipy.org/Tentative_NumPy_Tutorial>`_
+
+.. sourcecode:: ipython
+
+ In [7]: imgplot = mpimg.imshow(lum_img)
+
+.. plot::
+
+ import matplotlib.pyplot as plt
+ import matplotlib.image as mpimg
+ import numpy as np
+ img = mpimg.imread('_static/stinkbug.png')
+ lum_img = img[:,:,0]
+ plt.imshow(lum_img)
+
+Now, with a luminosity image, the default colormap (aka lookup table, LUT), is applied. The default is called jet. There are plenty of others to choose from. Let's set some others using the :meth:`~matplotlib.image.Image.set_cmap` method on our image plot object:
+
+.. sourcecode:: ipython
+
+ In [8]: imgplot.set_cmap('hot')
+
+.. plot::
+
+ import matplotlib.pyplot as plt
+ import matplotlib.image as mpimg
+ import numpy as np
+ img = mpimg.imread('_static/stinkbug.png')
+ lum_img = img[:,:,0]
+ imgplot = plt.imshow(lum_img)
+ imgplot.set_cmap('hot')
+
+.. sourcecode:: ipython
+
+ In [9]: imgplot.set_cmap('spectral')
+
+.. plot::
+
+ import matplotlib.pyplot as plt
+ import matplotlib.image as mpimg
+ import numpy as np
+ img = mpimg.imread('_static/stinkbug.png')
+ lum_img = img[:,:,0]
+ imgplot = plt.imshow(lum_img)
+ imgplot.set_cmap('spectral')
+
+There are many other colormap schemes available. See a list and images of the colormaps `here <http://matplotlib.sourceforge.net/examples/pylab_examples/show_colormaps.html>`_
+
+.. _Color Bars
+
+Color scale reference
+------------------------
+
+It's helpful to have an idea of what value a color represents. We can do that by adding color bars. It's as easy as one line:
+
+.. sourcecode:: ipython
+ In [10]: plt.colorbar()
+
+.. plot::
+
+ import matplotlib.pyplot as plt
+ import matplotlib.image as mpimg
+ import numpy as np
+ img = mpimg.imread('_static/stinkbug.png')
+ lum_img = img[:,:,0]
+ imgplot = plt.imshow(lum_img)
+ imgplot.set_cmap('spectral')
+ plt.colorbar()
+
+This adds a colorbar to your existing figure. This won't automatically change if you change you switch to a different colormap - you have to re-create your plot, and add in the colorbar again.
+
+.. _Data ranges
+
+Examining a specific data range
+---------------------------------
+
+Sometimes you want to enhance the contrast in your image, or expand the contrast in a particular region while sacrificing the detail in colors that don't vary much, or don't matter. A good tool to find interesting regions is the histogram. To create a histogram of our image data, we use the :func:`~matplotlib.pyplot.hist` function.
+
+.. sourcecode:: ipython
+
+ In[10]: plt.hist(lum_img)
+
+.. plot::
+
+ import matplotlib.pyplot as plt
+ import matplotlib.image as mpimg
+ import numpy as np
+ img = mpimg.imread('_static/stinkbug.png')
+ lum_img = img[:,:,0]
+ plt.hist(lum_img, range=(0.0,1.0))
+
+Most often, the "interesting" part of the image is around the peak, and you can get extra contrast by clipping the regions above and/or below the peak. In our histogram, it looks like there's not much useful information in the high end (not many white things in the image). Let's adjust the upper limit, so that we effectively "zoom in on" part of the histogram. We do this by calling the :meth:`~matplotlib.image.Image.set_clim` method of the image plot object.
+
+.. sourcecode:: ipython
+
+ In[11]: imgplot.set_clim=(0.0,0.7)
+
+.. plot::
+
+ import matplotlib.pyplot as plt
+ import matplotlib.image as mpimg
+ import numpy as np
+ fig = plt.figure()
+ a=fig.add_subplot(1,2,1)
+ img = mpimg.imread('_static/stinkbug.png')
+ lum_img = img[:,:,0]
+ imgplot = plt.imshow(lum_img)
+ a.set_title('Before')
+ plt.colorbar(ticks=[0.1,0.3,0.5,0.7], orientation ='horizontal')
+ a=fig.add_subplot(1,2,2)
+ imgplot = plt.imshow(lum_img)
+ imgplot.set_clim(0.0,0.7)
+ a.set_title('After')
+ plt.colorbar(ticks=[0.1,0.3,0.5,0.7], orientation='horizontal')
+
+.. _Interpolation:
+
+Array Interpolation schemes
+-----------------------------------
+Interpolation calculates what the color or value of a pixel "should" be, according to different mathematical schemes. One common place that this happens is when you resize an image. The number of pixels change, but you want the same information. Since pixels are discrete, there's missing space. Interpolation is how you fill that space. This is why your images sometimes come out looking pixelated when you blow them up. The effect is more pronounced when the difference between the original image and the expanded image is greater. Let's take our image and shrink it. We're effectively discarding pixels, only keeping a select few. Now when we plot it, that data gets blown up to the size on your screen. The old pixels aren't there anymore, and the computer has to draw in pixels to fill that space.
+
+.. sourcecode:: ipython
+
+ In [8]: import Image
+ In [9]: img = Image.open('stinkbug.png') # Open image as PIL image object
+ In [10]: rsize = img.resize((img.size[0]/10,img.size[1]/10)) # Use PIL to resize
+ In [11]: rsizeArr = np.asarray(rsize) # Get array back
+ In [12]: imgplot = mpimg.imshow(rsizeArr)
+
+.. plot::
+
+ import matplotlib.pyplot as plt
+ import matplotlib.image as mpimg
+ import numpy as np
+ import Image
+ img = Image.open('_static/stinkbug.png') # opens the file using PIL - it's not an array yet
+ rsize = img.resize((img.size[0]/10,img.size[1]/10)) # resize the image
+ rsizeArr = np.asarray(rsize)
+ lum_img = rsizeArr[:,:,0]
+ imgplot = plt.imshow(rsizeArr)
+
+Here we have the default interpolation, bilinear, since we did not give :func:`~matplotlib.pyplot.imshow` any interpolation argument.
+
+Let's try some others:
+
+.. sourcecode:: ipython
+
+ In [10]: imgplot.set_interpolation('nearest')
+
+.. plot::
+
+ import matplotlib.pyplot as plt
+ import matplotlib.image as mpimg
+ import numpy as np
+ import Image
+ img = Image.open('_static/stinkbug.png') # opens the file using PIL - it's not an array yet
+ rsize = img.resize((img.size[0]/10,img.size[1]/10)) # resize the image
+ rsizeArr = np.asarray(rsize)
+ lum_img = rsizeArr[:,:,0]
+ imgplot = plt.imshow(rsizeArr)
+ imgplot.set_interpolation('nearest')
+
+.. sourcecode:: ipython
+
+ In [10]: imgplot.set_interpolation('bicubic')
+
+.. plot::
+
+ import matplotlib.pyplot as plt
+ import matplotlib.image as mpimg
+ import numpy as np
+ import Image
+ img = Image.open('_static/stinkbug.png') # opens the file using PIL - it's not an array yet
+ rsize = img.resize((img.size[0]/10,img.size[1]/10)) # resize the image
+ rsizeArr = np.asarray(rsize)
+ lum_img = rsizeArr[:,:,0]
+ imgplot = plt.imshow(rsizeArr)
+ imgplot.set_interpolation('bicubic')
+
+Bicubic interpolation is often used when blowing up photos - people tend to prefer blurry over pixelated.
\ No newline at end of file
Modified: trunk/matplotlib/doc/users/index.rst
===================================================================
--- trunk/matplotlib/doc/users/index.rst 2009-08-29 17:48:37 UTC (rev 7584)
+++ trunk/matplotlib/doc/users/index.rst 2009-08-29 18:14:28 UTC (rev 7585)
@@ -19,6 +19,7 @@
customizing.rst
shell.rst
index_text.rst
+ image_tutorial.rst
artists.rst
legend_guide.rst
event_handling.rst
Modified: trunk/matplotlib/doc/users/transforms_tutorial.rst
===================================================================
--- trunk/matplotlib/doc/users/transforms_tutorial.rst 2009-08-29 17:48:37 UTC (rev 7584)
+++ trunk/matplotlib/doc/users/transforms_tutorial.rst 2009-08-29 18:14:28 UTC (rev 7585)
@@ -1,4 +1,4 @@
-.. _transformstutorial:
+.. _transforms_tutorial:
**************************
Transformations Tutorial
Modified: trunk/matplotlib/doc/users/whats_new.rst
===================================================================
--- trunk/matplotlib/doc/users/whats_new.rst 2009-08-29 17:48:37 UTC (rev 7584)
+++ trunk/matplotlib/doc/users/whats_new.rst 2009-08-29 18:14:28 UTC (rev 7585)
@@ -12,6 +12,16 @@
.. _whats-new-mplot3d:
+New documentation
+-----------------
+
+Jae-Joon Lee has written two new guides :ref:`plotting-guide-legend`
+and :ref:`plotting-guide-annotation`. Michael Sarahan has written
+:ref:`image_tutorial`. John Hunter has written two new tutorials on
+working with paths and transformations: :ref:`path_tutorial` and
+:ref:`transforms_tutorial`.
+
+
mplot3d
--------
@@ -53,12 +63,6 @@
.. plot:: pyplots/whats_new_99_spines.py
-New documentation
------------------
-
-jae-Joon Lee has written two new guides :ref:`plotting-guide-legend`
-and :ref:`plotting-guide-annotation`.
-
.. _whats-new-0-98-4:
new in 0.98.4
Property changes on: trunk/matplotlib/examples/misc/multiprocess.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/examples/misc/log.py:5753-5771
/branches/v0_98_5_maint/examples/misc/log.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/misc/multiprocess.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569
+ /branches/v0_91_maint/examples/misc/log.py:5753-5771
/branches/v0_98_5_maint/examples/misc/log.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/misc/multiprocess.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584
Property changes on: trunk/matplotlib/examples/mplot3d/contour3d_demo.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/examples/mplot3d/contour.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/contour.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/contour3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569
+ /branches/v0_91_maint/examples/mplot3d/contour.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/contour.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/contour3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584
Property changes on: trunk/matplotlib/examples/mplot3d/contourf3d_demo.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/examples/mplot3d/contourf.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/contourf.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/contourf3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569
+ /branches/v0_91_maint/examples/mplot3d/contourf.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/contourf.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/contourf3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584
Property changes on: trunk/matplotlib/examples/mplot3d/polys3d_demo.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/examples/mplot3d/polys.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/polys.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/polys3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569
+ /branches/v0_91_maint/examples/mplot3d/polys.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/polys.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/polys3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584
Property changes on: trunk/matplotlib/examples/mplot3d/scatter3d_demo.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/examples/mplot3d/scatter.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/scatter.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/scatter3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569
+ /branches/v0_91_maint/examples/mplot3d/scatter.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/scatter.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/scatter3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584
Property changes on: trunk/matplotlib/examples/mplot3d/surface3d_demo.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/examples/mplot3d/surface.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/surface.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/surface3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569
+ /branches/v0_91_maint/examples/mplot3d/surface.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/surface.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/surface3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584
Property changes on: trunk/matplotlib/examples/mplot3d/wire3d_demo.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/examples/mplot3d/wire.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/wire.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/wire3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569
+ /branches/v0_91_maint/examples/mplot3d/wire.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/wire.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/wire3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py 2009-08-29 17:48:37 UTC (rev 7584)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2009-08-29 18:14:28 UTC (rev 7585)
@@ -3615,6 +3615,7 @@
}
self.set_xscale('log', **d)
+ self.set_yscale('linear')
b = self._hold
self._hold = True # we've already processed the hold
l = self.plot(*args, **kwargs)
@@ -3665,6 +3666,7 @@
'nonposy': kwargs.pop('nonposy', 'mask'),
}
self.set_yscale('log', **d)
+ self.set_xscale('linear')
b = self._hold
self._hold = True # we've already processed the hold
l = self.plot(*args, **kwargs)
Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/mathmpl.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/sphinxext/mathmpl.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/mathmpl.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/lib/matplotlib/sphinxext/mathmpl.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569
+ /branches/v0_91_maint/doc/sphinxext/mathmpl.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/mathmpl.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/lib/matplotlib/sphinxext/mathmpl.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584
Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/only_directives.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/sphinxext/only_directives.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/only_directives.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/lib/matplotlib/sphinxext/only_directives.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569
+ /branches/v0_91_maint/doc/sphinxext/only_directives.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/only_directives.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/lib/matplotlib/sphinxext/only_directives.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584
Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/sphinxext/plot_directive.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/plot_directive.py:6920-6925,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/lib/matplotlib/sphinxext/plot_directive.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569
+ /branches/v0_91_maint/doc/sphinxext/plot_directive.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/plot_directive.py:6920-6925,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/lib/matplotlib/sphinxext/plot_directive.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ef...@us...> - 2009-08-29 17:48:44
|
Revision: 7584
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7584&view=rev
Author: efiring
Date: 2009-08-29 17:48:37 +0000 (Sat, 29 Aug 2009)
Log Message:
-----------
Semilogx, semilogy ensure one axis is linear; patch by Tony Yu
Modified Paths:
--------------
branches/v0_99_maint/lib/matplotlib/axes.py
Modified: branches/v0_99_maint/lib/matplotlib/axes.py
===================================================================
--- branches/v0_99_maint/lib/matplotlib/axes.py 2009-08-29 16:46:44 UTC (rev 7583)
+++ branches/v0_99_maint/lib/matplotlib/axes.py 2009-08-29 17:48:37 UTC (rev 7584)
@@ -3601,6 +3601,7 @@
}
self.set_xscale('log', **d)
+ self.set_yscale('linear')
b = self._hold
self._hold = True # we've already processed the hold
l = self.plot(*args, **kwargs)
@@ -3651,6 +3652,7 @@
'nonposy': kwargs.pop('nonposy', 'mask'),
}
self.set_yscale('log', **d)
+ self.set_xscale('linear')
b = self._hold
self._hold = True # we've already processed the hold
l = self.plot(*args, **kwargs)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2009-08-29 16:46:55
|
Revision: 7583
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7583&view=rev
Author: jdh2358
Date: 2009-08-29 16:46:44 +0000 (Sat, 29 Aug 2009)
Log Message:
-----------
minor tweaks to the image tut
Modified Paths:
--------------
branches/v0_99_maint/doc/users/image_tutorial.rst
Modified: branches/v0_99_maint/doc/users/image_tutorial.rst
===================================================================
--- branches/v0_99_maint/doc/users/image_tutorial.rst 2009-08-29 16:35:35 UTC (rev 7582)
+++ branches/v0_99_maint/doc/users/image_tutorial.rst 2009-08-29 16:46:44 UTC (rev 7583)
@@ -12,16 +12,16 @@
At the very least, you'll need to have access to the :func:`~matplotlib.pyplot.imshow` function. There are a couple of ways to do it. The easy way for an interactive environment::
- $ipython -pylab -wthread
+ $ipython -pylab
The imshow function is now directly accessible (it's in your
`namespace <http://bytebaker.com/2008/07/30/python-namespaces/>`_).
See also :ref:`pyplot-tutorial`.
-The more expressive, easier to understand later method (use this in your scripts to make it easier for others (including your future self) to read)::
+The more expressive, easier to understand later method (use this in
+your scripts to make it easier for others (including your future self)
+to read) is to use the matplotlib API (see :ref:`artist-tutorial`) where you use explicit namespaces and control object creation, etc...
- $ipython -wthread
-
.. sourcecode:: ipython
In [1]: import matplotlib.pyplot as plt
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2009-08-29 16:35:46
|
Revision: 7582
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7582&view=rev
Author: jdh2358
Date: 2009-08-29 16:35:35 +0000 (Sat, 29 Aug 2009)
Log Message:
-----------
added Michael Sarahan's image tutorial from the scipy mpl sprint
Modified Paths:
--------------
branches/v0_99_maint/doc/_templates/indexsidebar.html
branches/v0_99_maint/doc/_templates/layout.html
branches/v0_99_maint/doc/devel/coding_guide.rst
branches/v0_99_maint/doc/users/index.rst
branches/v0_99_maint/doc/users/transforms_tutorial.rst
branches/v0_99_maint/doc/users/whats_new.rst
Added Paths:
-----------
branches/v0_99_maint/doc/_static/stinkbug.png
branches/v0_99_maint/doc/users/image_tutorial.rst
Added: branches/v0_99_maint/doc/_static/stinkbug.png
===================================================================
(Binary files differ)
Property changes on: branches/v0_99_maint/doc/_static/stinkbug.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: branches/v0_99_maint/doc/_templates/indexsidebar.html
===================================================================
--- branches/v0_99_maint/doc/_templates/indexsidebar.html 2009-08-28 12:20:11 UTC (rev 7581)
+++ branches/v0_99_maint/doc/_templates/indexsidebar.html 2009-08-29 16:35:35 UTC (rev 7582)
@@ -52,7 +52,7 @@
but it is a good idea to ping us on the mailing list too.</p>
<p>For details on what's new, see the detailed <a href="{{
-pathto('_static/CHANGELOG', 1) }}">changelog</a>. Anything that could
+pathto('_static/CHANGELOG', 1) }}">changelog</a> or browse the <a href="http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/matplotlib/">source code</a>. Anything that could
require changes to your existing codes is logged in the <a href="{{
pathto('api/api_changes.html', 1) }}">api changes</a> file.</p>
Modified: branches/v0_99_maint/doc/_templates/layout.html
===================================================================
--- branches/v0_99_maint/doc/_templates/layout.html 2009-08-28 12:20:11 UTC (rev 7581)
+++ branches/v0_99_maint/doc/_templates/layout.html 2009-08-29 16:35:35 UTC (rev 7582)
@@ -4,7 +4,7 @@
{% block rootrellink %}
<li><a href="{{ pathto('index') }}">home</a>| </li>
<li><a href="{{ pathto('search') }}">search</a>| </li>
- <li><a href="examples/index.html">examples</a>| </li>
+ <li><a href="http://matplotlib.sf.net/examples/index.html">examples</a>| </li>
<li><a href="{{ pathto('gallery') }}">gallery</a>| </li>
<li><a href="{{ pathto('contents') }}">docs</a> »</li>
{% endblock %}
Modified: branches/v0_99_maint/doc/devel/coding_guide.rst
===================================================================
--- branches/v0_99_maint/doc/devel/coding_guide.rst 2009-08-28 12:20:11 UTC (rev 7581)
+++ branches/v0_99_maint/doc/devel/coding_guide.rst 2009-08-29 16:35:35 UTC (rev 7582)
@@ -1,4 +1,4 @@
-M.. _coding-guide:
+.. _coding-guide:
************
Coding guide
Added: branches/v0_99_maint/doc/users/image_tutorial.rst
===================================================================
--- branches/v0_99_maint/doc/users/image_tutorial.rst (rev 0)
+++ branches/v0_99_maint/doc/users/image_tutorial.rst 2009-08-29 16:35:35 UTC (rev 7582)
@@ -0,0 +1,324 @@
+.. _image_tutorial:
+
+
+**************
+Image tutorial
+**************
+
+.. _imaging_startup:
+
+Startup commands
+===================
+
+At the very least, you'll need to have access to the :func:`~matplotlib.pyplot.imshow` function. There are a couple of ways to do it. The easy way for an interactive environment::
+
+ $ipython -pylab -wthread
+
+The imshow function is now directly accessible (it's in your
+`namespace <http://bytebaker.com/2008/07/30/python-namespaces/>`_).
+See also :ref:`pyplot-tutorial`.
+
+The more expressive, easier to understand later method (use this in your scripts to make it easier for others (including your future self) to read)::
+
+ $ipython -wthread
+
+.. sourcecode:: ipython
+
+ In [1]: import matplotlib.pyplot as plt
+ In [2]: import matplotlib.image as mpimg
+ In [3]: import numpy as np
+
+Examples below will use the latter method, for clarity. In these examples, if you use the -pylab method, you can skip the "mpimg." and "plt." prefixes.
+
+.. _importing_data:
+
+Importing image data into Numpy arrays
+===============================================
+
+Plotting image data is supported by the Python Image Library (`PIL <http://www.pythonware.com/products/pil/>`_), . Natively, matplotlib only supports PNG images. The commands shown below fall back on PIL if the native read fails.
+
+The image used in this example is a PNG file, but keep that PIL requirement in mind for your own data.
+
+Here's the image we're going to play with:
+
+.. image:: ../_static/stinkbug.png
+
+It's a 24-bit RGB PNG image (8 bits for each of R, G, B). Depending
+on where you get your data, the other kinds of image that you'll most
+likely encounter are RGBA images, which allow for transparency, or
+single-channel grayscale (luminosity) images. You can right click on
+it and choose "Save image as" to download it to your computer for the
+rest of this tutorial.
+
+And here we go...
+
+.. sourcecode:: ipython
+
+ In [4]: img=mpimg.imread('stinkbug.png')
+ Out[4]:
+ array([[[ 0.40784314, 0.40784314, 0.40784314],
+ [ 0.40784314, 0.40784314, 0.40784314],
+ [ 0.40784314, 0.40784314, 0.40784314],
+ ...,
+ [ 0.42745098, 0.42745098, 0.42745098],
+ [ 0.42745098, 0.42745098, 0.42745098],
+ [ 0.42745098, 0.42745098, 0.42745098]],
+
+ [[ 0.41176471, 0.41176471, 0.41176471],
+ [ 0.41176471, 0.41176471, 0.41176471],
+ [ 0.41176471, 0.41176471, 0.41176471],
+ ...,
+ [ 0.42745098, 0.42745098, 0.42745098],
+ [ 0.42745098, 0.42745098, 0.42745098],
+ [ 0.42745098, 0.42745098, 0.42745098]],
+
+ [[ 0.41960785, 0.41960785, 0.41960785],
+ [ 0.41568628, 0.41568628, 0.41568628],
+ [ 0.41568628, 0.41568628, 0.41568628],
+ ...,
+ [ 0.43137255, 0.43137255, 0.43137255],
+ [ 0.43137255, 0.43137255, 0.43137255],
+ [ 0.43137255, 0.43137255, 0.43137255]],
+
+ ...,
+ [[ 0.43921569, 0.43921569, 0.43921569],
+ [ 0.43529412, 0.43529412, 0.43529412],
+ [ 0.43137255, 0.43137255, 0.43137255],
+ ...,
+ [ 0.45490196, 0.45490196, 0.45490196],
+ [ 0.4509804 , 0.4509804 , 0.4509804 ],
+ [ 0.4509804 , 0.4509804 , 0.4509804 ]],
+
+ [[ 0.44313726, 0.44313726, 0.44313726],
+ [ 0.44313726, 0.44313726, 0.44313726],
+ [ 0.43921569, 0.43921569, 0.43921569],
+ ...,
+ [ 0.4509804 , 0.4509804 , 0.4509804 ],
+ [ 0.44705883, 0.44705883, 0.44705883],
+ [ 0.44705883, 0.44705883, 0.44705883]],
+
+ [[ 0.44313726, 0.44313726, 0.44313726],
+ [ 0.4509804 , 0.4509804 , 0.4509804 ],
+ [ 0.4509804 , 0.4509804 , 0.4509804 ],
+ ...,
+ [ 0.44705883, 0.44705883, 0.44705883],
+ [ 0.44705883, 0.44705883, 0.44705883],
+ [ 0.44313726, 0.44313726, 0.44313726]]], dtype=float32)
+
+Note the dtype there - float32. Matplotlib has rescaled the 8 bit data from each channel to floating point data between 0.0 and 1.0. As a side note, the only datatype that PIL can work with is uint8. Matplotlib plotting can handle float32 and uint8, but image reading/writing for any format other than PNG is limited to uint8 data. Why 8 bits? Most displays can only render 8 bits per channel worth of color gradation. Why can they only render 8 bits/channel? Because that's about all the human eye can see. More here (from a photography standpoint): `Luminous Landscape bit depth tutorial <http://www.luminous-landscape.com/tutorials/bit-depth.shtml>`_
+
+Each inner list represents a pixel. Here, with an RGB image, there are 3 values. Since it's a black and white image, R, G, and B are all similar. An RGBA (where A is alpha, or transparency), has 4 values per inner list, and a simple luminance image just has one value (and is thus only a 2-D array, not a 3-D array). For RGB and RGBA images, matplotlib supports float32 and uint8 data types. For grayscale, matplotlib supports only float32. If your array data does not meet one of these descriptions, you need to rescale it.
+
+.. _plotting_data:
+
+Plotting numpy arrays as images
+===================================
+
+So, you have your data in a numpy array (either by importing it, or by generating it). Let's render it. In Matplotlib, this is performed using the :func:`~matplotlib.pyplot.imshow` function. Here we'll grab the plot object. This object gives you an easy way to manipulate the plot from the prompt.
+
+.. sourcecode:: ipython
+
+ In [5]: imgplot = plt.imshow(img)
+
+.. plot::
+
+ import matplotlib.pyplot as plt
+ import matplotlib.image as mpimg
+ import numpy as np
+ img = mpimg.imread('_static/stinkbug.png')
+ imgplot = plt.imshow(img)
+
+You can also plot any numpy array - just remember that the datatype must be float32 (and range from 0.0 to 1.0) or uint8.
+
+.. _Pseudocolor:
+
+Applying pseudocolor schemes to image plots
+-------------------------------------------------
+
+Pseudocolor can be a useful tool for enhancing contrast and visualizing your data more easily. This is especially useful when making presentations of your data using projectors - their contrast is typically quite poor.
+
+Pseudocolor is only relevant to single-channel, grayscale, luminosity images. We currently have an RGB image. Since R, G, and B are all similar (see for yourself above or in your data), we can just pick on channel of our data:
+
+.. sourcecode:: ipython
+
+ In [6]: lum_img = img[:,:,0]
+
+This is array slicing. You can read more `here <http://www.scipy.org/Tentative_NumPy_Tutorial>`_
+
+.. sourcecode:: ipython
+
+ In [7]: imgplot = mpimg.imshow(lum_img)
+
+.. plot::
+
+ import matplotlib.pyplot as plt
+ import matplotlib.image as mpimg
+ import numpy as np
+ img = mpimg.imread('_static/stinkbug.png')
+ lum_img = img[:,:,0]
+ plt.imshow(lum_img)
+
+Now, with a luminosity image, the default colormap (aka lookup table, LUT), is applied. The default is called jet. There are plenty of others to choose from. Let's set some others using the :meth:`~matplotlib.image.Image.set_cmap` method on our image plot object:
+
+.. sourcecode:: ipython
+
+ In [8]: imgplot.set_cmap('hot')
+
+.. plot::
+
+ import matplotlib.pyplot as plt
+ import matplotlib.image as mpimg
+ import numpy as np
+ img = mpimg.imread('_static/stinkbug.png')
+ lum_img = img[:,:,0]
+ imgplot = plt.imshow(lum_img)
+ imgplot.set_cmap('hot')
+
+.. sourcecode:: ipython
+
+ In [9]: imgplot.set_cmap('spectral')
+
+.. plot::
+
+ import matplotlib.pyplot as plt
+ import matplotlib.image as mpimg
+ import numpy as np
+ img = mpimg.imread('_static/stinkbug.png')
+ lum_img = img[:,:,0]
+ imgplot = plt.imshow(lum_img)
+ imgplot.set_cmap('spectral')
+
+There are many other colormap schemes available. See a list and images of the colormaps `here <http://matplotlib.sourceforge.net/examples/pylab_examples/show_colormaps.html>`_
+
+.. _Color Bars
+
+Color scale reference
+------------------------
+
+It's helpful to have an idea of what value a color represents. We can do that by adding color bars. It's as easy as one line:
+
+.. sourcecode:: ipython
+ In [10]: plt.colorbar()
+
+.. plot::
+
+ import matplotlib.pyplot as plt
+ import matplotlib.image as mpimg
+ import numpy as np
+ img = mpimg.imread('_static/stinkbug.png')
+ lum_img = img[:,:,0]
+ imgplot = plt.imshow(lum_img)
+ imgplot.set_cmap('spectral')
+ plt.colorbar()
+
+This adds a colorbar to your existing figure. This won't automatically change if you change you switch to a different colormap - you have to re-create your plot, and add in the colorbar again.
+
+.. _Data ranges
+
+Examining a specific data range
+---------------------------------
+
+Sometimes you want to enhance the contrast in your image, or expand the contrast in a particular region while sacrificing the detail in colors that don't vary much, or don't matter. A good tool to find interesting regions is the histogram. To create a histogram of our image data, we use the :func:`~matplotlib.pyplot.hist` function.
+
+.. sourcecode:: ipython
+
+ In[10]: plt.hist(lum_img)
+
+.. plot::
+
+ import matplotlib.pyplot as plt
+ import matplotlib.image as mpimg
+ import numpy as np
+ img = mpimg.imread('_static/stinkbug.png')
+ lum_img = img[:,:,0]
+ plt.hist(lum_img, range=(0.0,1.0))
+
+Most often, the "interesting" part of the image is around the peak, and you can get extra contrast by clipping the regions above and/or below the peak. In our histogram, it looks like there's not much useful information in the high end (not many white things in the image). Let's adjust the upper limit, so that we effectively "zoom in on" part of the histogram. We do this by calling the :meth:`~matplotlib.image.Image.set_clim` method of the image plot object.
+
+.. sourcecode:: ipython
+
+ In[11]: imgplot.set_clim=(0.0,0.7)
+
+.. plot::
+
+ import matplotlib.pyplot as plt
+ import matplotlib.image as mpimg
+ import numpy as np
+ fig = plt.figure()
+ a=fig.add_subplot(1,2,1)
+ img = mpimg.imread('_static/stinkbug.png')
+ lum_img = img[:,:,0]
+ imgplot = plt.imshow(lum_img)
+ a.set_title('Before')
+ plt.colorbar(ticks=[0.1,0.3,0.5,0.7], orientation ='horizontal')
+ a=fig.add_subplot(1,2,2)
+ imgplot = plt.imshow(lum_img)
+ imgplot.set_clim(0.0,0.7)
+ a.set_title('After')
+ plt.colorbar(ticks=[0.1,0.3,0.5,0.7], orientation='horizontal')
+
+.. _Interpolation:
+
+Array Interpolation schemes
+-----------------------------------
+Interpolation calculates what the color or value of a pixel "should" be, according to different mathematical schemes. One common place that this happens is when you resize an image. The number of pixels change, but you want the same information. Since pixels are discrete, there's missing space. Interpolation is how you fill that space. This is why your images sometimes come out looking pixelated when you blow them up. The effect is more pronounced when the difference between the original image and the expanded image is greater. Let's take our image and shrink it. We're effectively discarding pixels, only keeping a select few. Now when we plot it, that data gets blown up to the size on your screen. The old pixels aren't there anymore, and the computer has to draw in pixels to fill that space.
+
+.. sourcecode:: ipython
+
+ In [8]: import Image
+ In [9]: img = Image.open('stinkbug.png') # Open image as PIL image object
+ In [10]: rsize = img.resize((img.size[0]/10,img.size[1]/10)) # Use PIL to resize
+ In [11]: rsizeArr = np.asarray(rsize) # Get array back
+ In [12]: imgplot = mpimg.imshow(rsizeArr)
+
+.. plot::
+
+ import matplotlib.pyplot as plt
+ import matplotlib.image as mpimg
+ import numpy as np
+ import Image
+ img = Image.open('_static/stinkbug.png') # opens the file using PIL - it's not an array yet
+ rsize = img.resize((img.size[0]/10,img.size[1]/10)) # resize the image
+ rsizeArr = np.asarray(rsize)
+ lum_img = rsizeArr[:,:,0]
+ imgplot = plt.imshow(rsizeArr)
+
+Here we have the default interpolation, bilinear, since we did not give :func:`~matplotlib.pyplot.imshow` any interpolation argument.
+
+Let's try some others:
+
+.. sourcecode:: ipython
+
+ In [10]: imgplot.set_interpolation('nearest')
+
+.. plot::
+
+ import matplotlib.pyplot as plt
+ import matplotlib.image as mpimg
+ import numpy as np
+ import Image
+ img = Image.open('_static/stinkbug.png') # opens the file using PIL - it's not an array yet
+ rsize = img.resize((img.size[0]/10,img.size[1]/10)) # resize the image
+ rsizeArr = np.asarray(rsize)
+ lum_img = rsizeArr[:,:,0]
+ imgplot = plt.imshow(rsizeArr)
+ imgplot.set_interpolation('nearest')
+
+.. sourcecode:: ipython
+
+ In [10]: imgplot.set_interpolation('bicubic')
+
+.. plot::
+
+ import matplotlib.pyplot as plt
+ import matplotlib.image as mpimg
+ import numpy as np
+ import Image
+ img = Image.open('_static/stinkbug.png') # opens the file using PIL - it's not an array yet
+ rsize = img.resize((img.size[0]/10,img.size[1]/10)) # resize the image
+ rsizeArr = np.asarray(rsize)
+ lum_img = rsizeArr[:,:,0]
+ imgplot = plt.imshow(rsizeArr)
+ imgplot.set_interpolation('bicubic')
+
+Bicubic interpolation is often used when blowing up photos - people tend to prefer blurry over pixelated.
\ No newline at end of file
Modified: branches/v0_99_maint/doc/users/index.rst
===================================================================
--- branches/v0_99_maint/doc/users/index.rst 2009-08-28 12:20:11 UTC (rev 7581)
+++ branches/v0_99_maint/doc/users/index.rst 2009-08-29 16:35:35 UTC (rev 7582)
@@ -19,6 +19,7 @@
customizing.rst
shell.rst
index_text.rst
+ image_tutorial.rst
artists.rst
legend_guide.rst
event_handling.rst
Modified: branches/v0_99_maint/doc/users/transforms_tutorial.rst
===================================================================
--- branches/v0_99_maint/doc/users/transforms_tutorial.rst 2009-08-28 12:20:11 UTC (rev 7581)
+++ branches/v0_99_maint/doc/users/transforms_tutorial.rst 2009-08-29 16:35:35 UTC (rev 7582)
@@ -1,4 +1,4 @@
-.. _transformstutorial:
+.. _transforms_tutorial:
**************************
Transformations Tutorial
Modified: branches/v0_99_maint/doc/users/whats_new.rst
===================================================================
--- branches/v0_99_maint/doc/users/whats_new.rst 2009-08-28 12:20:11 UTC (rev 7581)
+++ branches/v0_99_maint/doc/users/whats_new.rst 2009-08-29 16:35:35 UTC (rev 7582)
@@ -12,6 +12,16 @@
.. _whats-new-mplot3d:
+New documentation
+-----------------
+
+Jae-Joon Lee has written two new guides :ref:`plotting-guide-legend`
+and :ref:`plotting-guide-annotation`. Michael Sarahan has written
+:ref:`image_tutorial`. John Hunter has written two new tutorials on
+working with paths and transformations: :ref:`path_tutorial` and
+:ref:`transforms_tutorial`.
+
+
mplot3d
--------
@@ -53,12 +63,6 @@
.. plot:: pyplots/whats_new_99_spines.py
-New documentation
------------------
-
-jae-Joon Lee has written two new guides :ref:`plotting-guide-legend`
-and :ref:`plotting-guide-annotation`.
-
.. _whats-new-0-98-4:
new in 0.98.4
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2009-08-28 12:21:57
|
Revision: 7581
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7581&view=rev
Author: jswhit
Date: 2009-08-28 12:20:11 +0000 (Fri, 28 Aug 2009)
Log Message:
-----------
fix typo in comment
Modified Paths:
--------------
trunk/matplotlib/examples/pylab_examples/shading_example.py
Modified: trunk/matplotlib/examples/pylab_examples/shading_example.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/shading_example.py 2009-08-27 20:35:07 UTC (rev 7580)
+++ trunk/matplotlib/examples/pylab_examples/shading_example.py 2009-08-28 12:20:11 UTC (rev 7581)
@@ -4,14 +4,14 @@
# example showing how to make shaded relief plots
# like mathematica
-# (http://reference.wolfram.com/mathematica/ref/ReliefPlot.html )
+# (http://reference.wolfram.com/mathematica/ref/ReliefPlot.html)
# or Generic Mapping Tools
# (http://gmt.soest.hawaii.edu/gmt/doc/gmt/html/GMT_Docs/node145.html)
# test data
X,Y=np.mgrid[-5:5:0.05,-5:5:0.05]
Z=np.sqrt(X**2+Y**2)+np.sin(X**2+Y**2)
-# creat light source object.
+# create light source object.
ls = LightSource(azdeg=0,altdeg=65)
# shade data, creating an rgb array.
rgb = ls.shade(Z,plt.cm.copper)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <as...@us...> - 2009-08-27 20:35:15
|
Revision: 7580
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7580&view=rev
Author: astraw
Date: 2009-08-27 20:35:07 +0000 (Thu, 27 Aug 2009)
Log Message:
-----------
correct baseline image (very small tick/spine placement differences)
Modified Paths:
--------------
trunk/matplotlib/test/test_plots/baseline/TestPlot/shaped_data.png
Modified: trunk/matplotlib/test/test_plots/baseline/TestPlot/shaped_data.png
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <as...@us...> - 2009-08-27 20:32:34
|
Revision: 7579
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7579&view=rev
Author: astraw
Date: 2009-08-27 20:32:28 +0000 (Thu, 27 Aug 2009)
Log Message:
-----------
correct baseline image with radial gridlines bug fixed
Modified Paths:
--------------
trunk/matplotlib/test/test_plots/baseline/TestPolar/polar_wrap_360.png
Modified: trunk/matplotlib/test/test_plots/baseline/TestPolar/polar_wrap_360.png
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <as...@us...> - 2009-08-27 20:30:58
|
Revision: 7578
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7578&view=rev
Author: astraw
Date: 2009-08-27 20:30:51 +0000 (Thu, 27 Aug 2009)
Log Message:
-----------
correct baseline image with radial gridlines bug fixed
Modified Paths:
--------------
trunk/matplotlib/test/test_plots/baseline/TestPolar/polar_wrap_180.png
Modified: trunk/matplotlib/test/test_plots/baseline/TestPolar/polar_wrap_180.png
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2009-08-26 17:01:49
|
Revision: 7577
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7577&view=rev
Author: jswhit
Date: 2009-08-26 17:01:34 +0000 (Wed, 26 Aug 2009)
Log Message:
-----------
nightime regions were calculated incorrectly when solar declination < 0
(NH winter).
Modified Paths:
--------------
trunk/toolkits/basemap/lib/mpl_toolkits/basemap/solar.py
Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/solar.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/solar.py 2009-08-26 15:32:59 UTC (rev 7576)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/solar.py 2009-08-26 17:01:34 UTC (rev 7577)
@@ -48,19 +48,22 @@
# compute day/night terminator from hour angle, declination.
longitude = lons + tau
lats = np.arctan(-np.cos(longitude*dg2rad)/np.tan(dec*dg2rad))/dg2rad
- return lons, lats
+ return lons, lats, tau, dec
def daynight_grid(date, delta, lonmin, lonmax):
"""
date is datetime object (assumed UTC).
delta is the grid interval (in degrees) used to compute terminator."""
- lons, lats = daynight_terminator(date, delta, lonmin, lonmax)
+ lons, lats, tau, dec = daynight_terminator(date, delta, lonmin, lonmax)
# create day/night grid (1 for night, 0 for day)
lats2 = np.arange(-90,90+0.5*delta,delta,dtype=np.float32)
nlons = len(lons); nlats = len(lats2)
lons2, lats2 = np.meshgrid(lons,lats2)
lats = lats[np.newaxis,:]*np.ones((nlats,nlons),dtype=np.float32)
daynight = np.ones(lons2.shape, np.int8)
- daynight = np.where(lats2>lats,0,daynight)
+ if dec > 0: # NH summer
+ daynight = np.where(lats2>lats,0,daynight)
+ else: # NH winter
+ daynight = np.where(lats2<lats,0,daynight)
daynight = ma.array(daynight,mask=1-daynight) # mask day areas.
return lons2,lats2,daynight
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2009-08-26 15:33:06
|
Revision: 7576
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7576&view=rev
Author: jswhit
Date: 2009-08-26 15:32:59 +0000 (Wed, 26 Aug 2009)
Log Message:
-----------
added mention of new example.
Modified Paths:
--------------
trunk/toolkits/basemap/Changelog
Modified: trunk/toolkits/basemap/Changelog
===================================================================
--- trunk/toolkits/basemap/Changelog 2009-08-26 15:29:57 UTC (rev 7575)
+++ trunk/toolkits/basemap/Changelog 2009-08-26 15:32:59 UTC (rev 7576)
@@ -1,5 +1,6 @@
version 0.99.5 (not yet released)
* added 'nightshade' method to shade night regions on a map.
+ 'daynight.py' example added to illustrate usage.
* added lonmin, lonmax instance variables.
version 0.99.4 (svn revision 7332)
* ax.frame replaced with ax.spines to maintain compatibility
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2009-08-26 15:30:03
|
Revision: 7575
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7575&view=rev
Author: jswhit
Date: 2009-08-26 15:29:57 +0000 (Wed, 26 Aug 2009)
Log Message:
-----------
format date in title
Modified Paths:
--------------
trunk/toolkits/basemap/examples/daynight.py
Modified: trunk/toolkits/basemap/examples/daynight.py
===================================================================
--- trunk/toolkits/basemap/examples/daynight.py 2009-08-26 11:52:06 UTC (rev 7574)
+++ trunk/toolkits/basemap/examples/daynight.py 2009-08-26 15:29:57 UTC (rev 7575)
@@ -19,5 +19,5 @@
# map shows through. Use current time in UTC.
date = datetime.utcnow()
CS=map.nightshade(date)
-plt.title('Day/Night Map for %s (UTC)' % date)
+plt.title('Day/Night Map for %s (UTC)' % date.strftime("%d %b %Y %H:%M:%S"))
plt.show()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2009-08-26 11:52:14
|
Revision: 7574
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7574&view=rev
Author: jswhit
Date: 2009-08-26 11:52:06 +0000 (Wed, 26 Aug 2009)
Log Message:
-----------
check that date is utc in nightshade
Modified Paths:
--------------
trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2009-08-26 11:33:41 UTC (rev 7573)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2009-08-26 11:52:06 UTC (rev 7574)
@@ -3445,6 +3445,9 @@
returns a matplotlib.contour.ContourSet instance.
"""
from solar import daynight_grid
+ # make sure date is utc.
+ if date.utcoffset() is not None:
+ raise ValueError('datetime instance must be UTC')
# create grid of day=0, night=1
lons,lats,daynight = daynight_grid(date,delta,self.lonmin,self.lonmax)
x,y = self(lons,lats)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2009-08-26 11:33:47
|
Revision: 7573
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7573&view=rev
Author: jswhit
Date: 2009-08-26 11:33:41 +0000 (Wed, 26 Aug 2009)
Log Message:
-----------
up version number
Modified Paths:
--------------
trunk/toolkits/basemap/doc/conf.py
Modified: trunk/toolkits/basemap/doc/conf.py
===================================================================
--- trunk/toolkits/basemap/doc/conf.py 2009-08-26 11:32:41 UTC (rev 7572)
+++ trunk/toolkits/basemap/doc/conf.py 2009-08-26 11:33:41 UTC (rev 7573)
@@ -46,9 +46,9 @@
# other places throughout the built documents.
#
# The short X.Y version.
-version = '0.99.4'
+version = '0.99.5'
# The full version, including alpha/beta/rc tags.
-release = '0.99.4'
+release = '0.99.5'
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2009-08-26 11:32:48
|
Revision: 7572
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7572&view=rev
Author: jswhit
Date: 2009-08-26 11:32:41 +0000 (Wed, 26 Aug 2009)
Log Message:
-----------
cosmetic cleanup.
Modified Paths:
--------------
trunk/toolkits/basemap/examples/daynight.py
Modified: trunk/toolkits/basemap/examples/daynight.py
===================================================================
--- trunk/toolkits/basemap/examples/daynight.py 2009-08-26 01:12:32 UTC (rev 7571)
+++ trunk/toolkits/basemap/examples/daynight.py 2009-08-26 11:32:41 UTC (rev 7572)
@@ -5,6 +5,7 @@
# example showing how to compute the day/night terminator and shade nightime
# areas on a map.
+
# miller projection
map = Basemap(projection='mill',lon_0=180)
# plot coastlines, draw label meridians and parallels.
@@ -14,9 +15,8 @@
# fill continents 'coral' (with zorder=0), color wet areas 'aqua'
map.drawmapboundary(fill_color='aqua')
map.fillcontinents(color='coral',lake_color='aqua')
-# shade the night areas gray, with alpha transparency so the
-# map shows through.
-# use current time in UTC.
+# shade the night areas, with alpha transparency so the
+# map shows through. Use current time in UTC.
date = datetime.utcnow()
CS=map.nightshade(date)
plt.title('Day/Night Map for %s (UTC)' % date)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2009-08-26 01:12:49
|
Revision: 7571
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7571&view=rev
Author: jswhit
Date: 2009-08-26 01:12:32 +0000 (Wed, 26 Aug 2009)
Log Message:
-----------
added nightshade method
Modified Paths:
--------------
trunk/toolkits/basemap/Changelog
trunk/toolkits/basemap/examples/daynight.py
trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
trunk/toolkits/basemap/setup.py
Added Paths:
-----------
trunk/toolkits/basemap/lib/mpl_toolkits/basemap/solar.py
Modified: trunk/toolkits/basemap/Changelog
===================================================================
--- trunk/toolkits/basemap/Changelog 2009-08-25 20:06:13 UTC (rev 7570)
+++ trunk/toolkits/basemap/Changelog 2009-08-26 01:12:32 UTC (rev 7571)
@@ -1,3 +1,6 @@
+version 0.99.5 (not yet released)
+ * added 'nightshade' method to shade night regions on a map.
+ * added lonmin, lonmax instance variables.
version 0.99.4 (svn revision 7332)
* ax.frame replaced with ax.spines to maintain compatibility
with matplotlib spines support.
Modified: trunk/toolkits/basemap/examples/daynight.py
===================================================================
--- trunk/toolkits/basemap/examples/daynight.py 2009-08-25 20:06:13 UTC (rev 7570)
+++ trunk/toolkits/basemap/examples/daynight.py 2009-08-26 01:12:32 UTC (rev 7571)
@@ -1,93 +1,16 @@
import numpy as np
-from mpl_toolkits.basemap import Basemap, netcdftime
+from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
from datetime import datetime
-from numpy import ma
# example showing how to compute the day/night terminator and shade nightime
# areas on a map.
-
-def epem(date):
- """
- input: date - datetime object (assumed UTC)
- ouput: gha - Greenwich hour angle, the angle between the Greenwich
- meridian and the meridian containing the subsolar point.
- dec - solar declination.
- """
- dg2rad = np.pi/180.
- rad2dg = 1./dg2rad
- # compute julian day from UTC datetime object.
- jday = netcdftime.JulianDayFromDate(date)
- jd = np.floor(jday) # truncate to integer.
- # utc hour.
- ut = date.hour + date.minute/60. + date.second/3600.
- # calculate number of centuries from J2000
- t = (jd + (ut/24.) - 2451545.0) / 36525.
- # mean longitude corrected for aberration
- l = (280.460 + 36000.770 * t) % 360
- # mean anomaly
- g = 357.528 + 35999.050 * t
- # ecliptic longitude
- lm = l + 1.915 * np.sin(g*dg2rad) + 0.020 * np.sin(2*g*dg2rad)
- # obliquity of the ecliptic
- ep = 23.4393 - 0.01300 * t
- # equation of time
- eqtime = -1.915*np.sin(g*dg2rad) - 0.020*np.sin(2*g*dg2rad) \
- + 2.466*np.sin(2*lm*dg2rad) - 0.053*np.sin(4*lm*dg2rad)
- # Greenwich hour angle
- gha = 15*ut - 180 + eqtime
- # declination of sun
- dec = np.arcsin(np.sin(ep*dg2rad) * np.sin(lm*dg2rad)) * rad2dg
- return gha, dec
-
-def daynightgrid(date, nlons):
- """
- date is datetime object (assumed UTC).
- nlons is # of longitudes used to compute terminator."""
- dg2rad = np.pi/180.
- lons = np.linspace(-180,180,nlons).astype(np.float32)
- # compute greenwich hour angle and solar declination
- # from datetime object (assumed UTC).
- tau, dec = epem(date)
- # compute day/night terminator from hour angle, declination.
- longitude = lons + tau
- lats = np.arctan(-np.cos(longitude*dg2rad)/np.tan(dec*dg2rad))/dg2rad
- # create day/night grid (1 for night, 0 for day)
- nlats = ((nlons-1)/2)+1
- lons2 = np.linspace(-180,180,nlons).astype(np.float32)
- lats2 = np.linspace(-90,90,nlats).astype(np.float32)
- lons2, lats2 = np.meshgrid(lons2,lats2)
- lats = lats[np.newaxis,:]*np.ones((nlats,nlons),dtype=np.float32)
- daynight = np.ones(lons2.shape, np.int8)
- daynight = np.where(lats2>lats,0,daynight)
- daynight = ma.array(daynight,mask=1-daynight) # mask day areas.
- return lons2,lats2,daynight
-
-class Basemap2(Basemap):
- def nightshade(self,date,color="k",nlons=1441,alpha=0.5,zorder=None):
- # create grid of day=0, night=1
- # 1441 means use a 0.25 degree grid.
- lons,lats,daynight = daynightgrid(date,nlons)
- x,y = self(lons,lats)
- # contour the day-night grid, coloring the night area
- # with the specified color and transparency.
- CS = map.contourf(x,y,daynight,1,colors=[color],alpha=alpha)
- # set zorder on ContourSet collections show night shading
- # is on top.
- for c in CS.collections:
- if zorder is None:
- c.set_zorder(c.get_zorder()+1)
- else:
- c.set_zorder(zorder)
- return CS
-
-
# miller projection
-map = Basemap2(projection='mill',lon_0=0)
+map = Basemap(projection='mill',lon_0=180)
# plot coastlines, draw label meridians and parallels.
map.drawcoastlines()
map.drawparallels(np.arange(-90,90,30),labels=[1,0,0,0])
-map.drawmeridians(np.arange(-180,180,60),labels=[0,0,0,1])
+map.drawmeridians(np.arange(map.lonmin,map.lonmax+30,60),labels=[0,0,0,1])
# fill continents 'coral' (with zorder=0), color wet areas 'aqua'
map.drawmapboundary(fill_color='aqua')
map.fillcontinents(color='coral',lake_color='aqua')
Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2009-08-25 20:06:13 UTC (rev 7570)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2009-08-26 01:12:32 UTC (rev 7571)
@@ -53,7 +53,7 @@
else:
basemap_datadir = os.sep.join([os.path.dirname(__file__), 'data'])
-__version__ = '0.99.4'
+__version__ = '0.99.5'
# supported map projections.
_projnames = {'cyl' : 'Cylindrical Equidistant',
@@ -3421,6 +3421,42 @@
raise KeyError("barstyle must be 'simple' or 'fancy'")
return rets
+ def nightshade(self,date,color="k",delta=0.25,alpha=0.5,ax=None,zorder=2):
+ """
+ Shade the regions of the map that are in darkness at the time
+ specifed by ``date``. ``date`` is a datetime instance,
+ assumed to be UTC.
+
+ .. tabularcolumns:: |l|L|
+
+ ============== ====================================================
+ Keywords Description
+ ============== ====================================================
+ color color to shade night regions (default black).
+ delta day/night terminator is computed with a
+ a resolution of ``delta`` degrees (default 0.25).
+ alpha alpha transparency for shading (default 0.5, so
+ map background shows through).
+ zorder zorder for shading (default 2).
+ ============== ====================================================
+
+ Extra keyword ``ax`` can be used to override the default axis instance.
+
+ returns a matplotlib.contour.ContourSet instance.
+ """
+ from solar import daynight_grid
+ # create grid of day=0, night=1
+ lons,lats,daynight = daynight_grid(date,delta,self.lonmin,self.lonmax)
+ x,y = self(lons,lats)
+ # contour the day-night grid, coloring the night area
+ # with the specified color and transparency.
+ CS = self.contourf(x,y,daynight,1,colors=[color],alpha=alpha,ax=ax)
+ # set zorder on ContourSet collections show night shading
+ # is on top.
+ for c in CS.collections:
+ c.set_zorder(zorder)
+ return CS
+
def _check_ax(self):
"""
Returns the axis on which to draw.
Added: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/solar.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/solar.py (rev 0)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/solar.py 2009-08-26 01:12:32 UTC (rev 7571)
@@ -0,0 +1,66 @@
+# some simple functions to calculate solar position, day-night terminator
+import numpy as np
+from numpy import ma
+import netcdftime
+
+def epem(date):
+ """
+ input: date - datetime object (assumed UTC)
+ ouput: gha - Greenwich hour angle, the angle between the Greenwich
+ meridian and the meridian containing the subsolar point.
+ dec - solar declination.
+ """
+ dg2rad = np.pi/180.
+ rad2dg = 1./dg2rad
+ # compute julian day from UTC datetime object.
+ jday = netcdftime.JulianDayFromDate(date)
+ jd = np.floor(jday) # truncate to integer.
+ # utc hour.
+ ut = date.hour + date.minute/60. + date.second/3600.
+ # calculate number of centuries from J2000
+ t = (jd + (ut/24.) - 2451545.0) / 36525.
+ # mean longitude corrected for aberration
+ l = (280.460 + 36000.770 * t) % 360
+ # mean anomaly
+ g = 357.528 + 35999.050 * t
+ # ecliptic longitude
+ lm = l + 1.915 * np.sin(g*dg2rad) + 0.020 * np.sin(2*g*dg2rad)
+ # obliquity of the ecliptic
+ ep = 23.4393 - 0.01300 * t
+ # equation of time
+ eqtime = -1.915*np.sin(g*dg2rad) - 0.020*np.sin(2*g*dg2rad) \
+ + 2.466*np.sin(2*lm*dg2rad) - 0.053*np.sin(4*lm*dg2rad)
+ # Greenwich hour angle
+ gha = 15*ut - 180 + eqtime
+ # declination of sun
+ dec = np.arcsin(np.sin(ep*dg2rad) * np.sin(lm*dg2rad)) * rad2dg
+ return gha, dec
+
+def daynight_terminator(date, delta, lonmin, lonmax):
+ """
+ date is datetime object (assumed UTC).
+ nlons is # of longitudes used to compute terminator."""
+ dg2rad = np.pi/180.
+ lons = np.arange(lonmin,lonmax+0.5*delta,delta,dtype=np.float32)
+ # compute greenwich hour angle and solar declination
+ # from datetime object (assumed UTC).
+ tau, dec = epem(date)
+ # compute day/night terminator from hour angle, declination.
+ longitude = lons + tau
+ lats = np.arctan(-np.cos(longitude*dg2rad)/np.tan(dec*dg2rad))/dg2rad
+ return lons, lats
+
+def daynight_grid(date, delta, lonmin, lonmax):
+ """
+ date is datetime object (assumed UTC).
+ delta is the grid interval (in degrees) used to compute terminator."""
+ lons, lats = daynight_terminator(date, delta, lonmin, lonmax)
+ # create day/night grid (1 for night, 0 for day)
+ lats2 = np.arange(-90,90+0.5*delta,delta,dtype=np.float32)
+ nlons = len(lons); nlats = len(lats2)
+ lons2, lats2 = np.meshgrid(lons,lats2)
+ lats = lats[np.newaxis,:]*np.ones((nlats,nlons),dtype=np.float32)
+ daynight = np.ones(lons2.shape, np.int8)
+ daynight = np.where(lats2>lats,0,daynight)
+ daynight = ma.array(daynight,mask=1-daynight) # mask day areas.
+ return lons2,lats2,daynight
Modified: trunk/toolkits/basemap/setup.py
===================================================================
--- trunk/toolkits/basemap/setup.py 2009-08-25 20:06:13 UTC (rev 7570)
+++ trunk/toolkits/basemap/setup.py 2009-08-26 01:12:32 UTC (rev 7571)
@@ -225,7 +225,7 @@
package_data = {'mpl_toolkits.basemap':pyproj_datafiles+basemap_datafiles}
setup(
name = "basemap",
- version = "0.99.4",
+ version = "0.99.5",
description = "Plot data on map projections with matplotlib",
long_description = """
An add-on toolkit for matplotlib that lets you plot data
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2009-08-25 20:06:25
|
Revision: 7570
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7570&view=rev
Author: mdboom
Date: 2009-08-25 20:06:13 +0000 (Tue, 25 Aug 2009)
Log Message:
-----------
Merged revisions 7569 via svnmerge from
https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v0_99_maint
........
r7569 | mdboom | 2009-08-25 16:04:34 -0400 (Tue, 25 Aug 2009) | 2 lines
Fix cohere_pairs docstring so it builds with new versions of Sphinx
........
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/mlab.py
Property Changed:
----------------
trunk/matplotlib/
trunk/matplotlib/doc/pyplots/README
trunk/matplotlib/doc/sphinxext/gen_gallery.py
trunk/matplotlib/doc/sphinxext/gen_rst.py
trunk/matplotlib/examples/misc/multiprocess.py
trunk/matplotlib/examples/mplot3d/contour3d_demo.py
trunk/matplotlib/examples/mplot3d/contourf3d_demo.py
trunk/matplotlib/examples/mplot3d/polys3d_demo.py
trunk/matplotlib/examples/mplot3d/scatter3d_demo.py
trunk/matplotlib/examples/mplot3d/surface3d_demo.py
trunk/matplotlib/examples/mplot3d/wire3d_demo.py
trunk/matplotlib/lib/matplotlib/sphinxext/mathmpl.py
trunk/matplotlib/lib/matplotlib/sphinxext/only_directives.py
trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py
Property changes on: trunk/matplotlib
___________________________________________________________________
Modified: svnmerge-integrated
- /branches/mathtex:1-7263 /branches/v0_98_5_maint:1-7253 /branches/v0_99_maint:1-7567
+ /branches/mathtex:1-7263 /branches/v0_98_5_maint:1-7253 /branches/v0_99_maint:1-7569
Modified: svn:mergeinfo
- /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
+ /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569
Property changes on: trunk/matplotlib/doc/pyplots/README
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/doc/pyplots/README:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
+ /branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/doc/pyplots/README:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569
Property changes on: trunk/matplotlib/doc/sphinxext/gen_gallery.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/doc/sphinxext/gen_gallery.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
+ /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/doc/sphinxext/gen_gallery.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569
Property changes on: trunk/matplotlib/doc/sphinxext/gen_rst.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/doc/sphinxext/gen_rst.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
+ /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/doc/sphinxext/gen_rst.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569
Property changes on: trunk/matplotlib/examples/misc/multiprocess.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/examples/misc/log.py:5753-5771
/branches/v0_98_5_maint/examples/misc/log.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/misc/multiprocess.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
+ /branches/v0_91_maint/examples/misc/log.py:5753-5771
/branches/v0_98_5_maint/examples/misc/log.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/misc/multiprocess.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569
Property changes on: trunk/matplotlib/examples/mplot3d/contour3d_demo.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/examples/mplot3d/contour.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/contour.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/contour3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
+ /branches/v0_91_maint/examples/mplot3d/contour.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/contour.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/contour3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569
Property changes on: trunk/matplotlib/examples/mplot3d/contourf3d_demo.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/examples/mplot3d/contourf.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/contourf.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/contourf3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
+ /branches/v0_91_maint/examples/mplot3d/contourf.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/contourf.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/contourf3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569
Property changes on: trunk/matplotlib/examples/mplot3d/polys3d_demo.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/examples/mplot3d/polys.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/polys.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/polys3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
+ /branches/v0_91_maint/examples/mplot3d/polys.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/polys.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/polys3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569
Property changes on: trunk/matplotlib/examples/mplot3d/scatter3d_demo.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/examples/mplot3d/scatter.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/scatter.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/scatter3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
+ /branches/v0_91_maint/examples/mplot3d/scatter.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/scatter.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/scatter3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569
Property changes on: trunk/matplotlib/examples/mplot3d/surface3d_demo.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/examples/mplot3d/surface.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/surface.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/surface3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
+ /branches/v0_91_maint/examples/mplot3d/surface.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/surface.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/surface3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569
Property changes on: trunk/matplotlib/examples/mplot3d/wire3d_demo.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/examples/mplot3d/wire.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/wire.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/wire3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
+ /branches/v0_91_maint/examples/mplot3d/wire.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/wire.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/wire3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569
Modified: trunk/matplotlib/lib/matplotlib/mlab.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/mlab.py 2009-08-25 20:04:34 UTC (rev 7569)
+++ trunk/matplotlib/lib/matplotlib/mlab.py 2009-08-25 20:06:13 UTC (rev 7570)
@@ -497,77 +497,80 @@
returnPxx=False):
u"""
- Cxy, Phase, freqs = cohere_pairs( X, ij, ...)
+ Call signature::
- Compute the coherence and phase for all pairs ij, in X.
+ Cxy, Phase, freqs = cohere_pairs( X, ij, ...)
- Parameters
- ----------
- X: array
- a numSamples*numCols array
+ Compute the coherence and phase for all pairs *ij*, in *X*.
- ij: list of tuples
- Each tuple is a pair of indexes into the columns of X for which you want to
- compute coherence. For example, if X has 64 columns, and you want to
- compute all nonredundant pairs, define ij as
+ *X* is a *numSamples* * *numCols* array
+ *ij* is a list of tuples. Each tuple is a pair of indexes into
+ the columns of X for which you want to compute coherence. For
+ example, if *X* has 64 columns, and you want to compute all
+ nonredundant pairs, define *ij* as::
+
ij = []
for i in range(64):
for j in range(i+1,64):
ij.append( (i,j) )
- preferSpeedOverMemory: optional, bool
+ *preferSpeedOverMemory* is an optional bool. Defaults to true. If
+ False, limits the caching by only making one, rather than two,
+ complex cache arrays. This is useful if memory becomes critical.
+ Even when *preferSpeedOverMemory* is False, :func:`cohere_pairs`
+ will still give significant performace gains over calling
+ :func:`cohere` for each pair, and will use subtantially less
+ memory than if *preferSpeedOverMemory* is True. In my tests with
+ a 43000,64 array over all nonredundant pairs,
+ *preferSpeedOverMemory* = True delivered a 33% performance boost
+ on a 1.7GHZ Athlon with 512MB RAM compared with
+ *preferSpeedOverMemory* = False. But both solutions were more
+ than 10x faster than naively crunching all possible pairs through
+ :func:`cohere`.
- Defaults to true. If false, limits the caching by only making one, rather
- than two, complex cache arrays. This is useful if memory becomes critical.
- Even when preferSpeedOverMemory is false, cohere_pairs will still give
- significant performace gains over calling cohere for each pair, and will
- use subtantially less memory than if preferSpeedOverMemory is true. In my
- tests with a 43000,64 array over all nonredundant pairs,
- preferSpeedOverMemory=1 delivered a 33% performace boost on a 1.7GHZ Athlon
- with 512MB RAM compared with preferSpeedOverMemory=0. But both solutions
- were more than 10x faster than naievly crunching all possible pairs through
- cohere.
-
- Returns
- -------
+ Returns::
- (Cxy, Phase, freqs), where:
-
- Cxy: dictionary of (i,j) tuples -> coherence vector for that
- pair. Ie, Cxy[(i,j) = cohere(X[:,i], X[:,j]). Number of
- dictionary keys is len(ij)
+ (Cxy, Phase, freqs)
- Phase: dictionary of phases of the cross spectral density at
- each frequency for each pair. keys are (i,j).
+ where:
- freqs: vector of frequencies, equal in length to either the
- coherence or phase vectors for any i,j key.
+ - *Cxy*: dictionary of (*i*, *j*) tuples -> coherence vector for
+ that pair. I.e., ``Cxy[(i,j) = cohere(X[:,i], X[:,j])``.
+ Number of dictionary keys is ``len(ij)``.
- Eg, to make a coherence Bode plot:
+ - *Phase*: dictionary of phases of the cross spectral density at
+ each frequency for each pair. Keys are (*i*, *j*).
+ - *freqs*: vector of frequencies, equal in length to either the
+ coherence or phase vectors for any (*i*, *j*) key.
+
+ Eg., to make a coherence Bode plot::
+
subplot(211)
plot( freqs, Cxy[(12,19)])
subplot(212)
plot( freqs, Phase[(12,19)])
- For a large number of pairs, cohere_pairs can be much more
- efficient than just calling cohere for each pair, because it
- caches most of the intensive computations. If N is the number of
- pairs, this function is O(N) for most of the heavy lifting,
- whereas calling cohere for each pair is O(N^2). However, because
- of the caching, it is also more memory intensive, making 2
- additional complex arrays with approximately the same number of
- elements as X.
+ For a large number of pairs, :func:`cohere_pairs` can be much more
+ efficient than just calling :func:`cohere` for each pair, because
+ it caches most of the intensive computations. If :math:`N` is the
+ number of pairs, this function is :math:`O(N)` for most of the
+ heavy lifting, whereas calling cohere for each pair is
+ :math:`O(N^2)`. However, because of the caching, it is also more
+ memory intensive, making 2 additional complex arrays with
+ approximately the same number of elements as *X*.
- See test/cohere_pairs_test.py in the src tree for an example
- script that shows that this cohere_pairs and cohere give the same
- results for a given pair.
+ See :file:`test/cohere_pairs_test.py` in the src tree for an
+ example script that shows that this :func:`cohere_pairs` and
+ :func:`cohere` give the same results for a given pair.
- See also
- --------
- :func: psd
- """
+ .. sealso::
+
+ :func:`psd`
+ For information about the methods used to compute
+ :math:`P_{xy}`, :math:`P_{xx}` and :math:`P_{yy}`.
+ """
numRows, numCols = X.shape
# zero pad if X is too short
Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/mathmpl.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/sphinxext/mathmpl.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/mathmpl.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/lib/matplotlib/sphinxext/mathmpl.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
+ /branches/v0_91_maint/doc/sphinxext/mathmpl.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/mathmpl.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/lib/matplotlib/sphinxext/mathmpl.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569
Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/only_directives.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/sphinxext/only_directives.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/only_directives.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/lib/matplotlib/sphinxext/only_directives.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
+ /branches/v0_91_maint/doc/sphinxext/only_directives.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/only_directives.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/lib/matplotlib/sphinxext/only_directives.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569
Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/sphinxext/plot_directive.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/plot_directive.py:6920-6925,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/lib/matplotlib/sphinxext/plot_directive.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
+ /branches/v0_91_maint/doc/sphinxext/plot_directive.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/plot_directive.py:6920-6925,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/lib/matplotlib/sphinxext/plot_directive.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2009-08-25 20:04:41
|
Revision: 7569
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7569&view=rev
Author: mdboom
Date: 2009-08-25 20:04:34 +0000 (Tue, 25 Aug 2009)
Log Message:
-----------
Fix cohere_pairs docstring so it builds with new versions of Sphinx
Modified Paths:
--------------
branches/v0_99_maint/lib/matplotlib/mlab.py
Modified: branches/v0_99_maint/lib/matplotlib/mlab.py
===================================================================
--- branches/v0_99_maint/lib/matplotlib/mlab.py 2009-08-25 15:32:13 UTC (rev 7568)
+++ branches/v0_99_maint/lib/matplotlib/mlab.py 2009-08-25 20:04:34 UTC (rev 7569)
@@ -501,77 +501,80 @@
returnPxx=False):
u"""
- Cxy, Phase, freqs = cohere_pairs( X, ij, ...)
+ Call signature::
- Compute the coherence and phase for all pairs ij, in X.
+ Cxy, Phase, freqs = cohere_pairs( X, ij, ...)
- Parameters
- ----------
- X: array
- a numSamples*numCols array
+ Compute the coherence and phase for all pairs *ij*, in *X*.
- ij: list of tuples
- Each tuple is a pair of indexes into the columns of X for which you want to
- compute coherence. For example, if X has 64 columns, and you want to
- compute all nonredundant pairs, define ij as
+ *X* is a *numSamples* * *numCols* array
+ *ij* is a list of tuples. Each tuple is a pair of indexes into
+ the columns of X for which you want to compute coherence. For
+ example, if *X* has 64 columns, and you want to compute all
+ nonredundant pairs, define *ij* as::
+
ij = []
for i in range(64):
for j in range(i+1,64):
ij.append( (i,j) )
- preferSpeedOverMemory: optional, bool
+ *preferSpeedOverMemory* is an optional bool. Defaults to true. If
+ False, limits the caching by only making one, rather than two,
+ complex cache arrays. This is useful if memory becomes critical.
+ Even when *preferSpeedOverMemory* is False, :func:`cohere_pairs`
+ will still give significant performace gains over calling
+ :func:`cohere` for each pair, and will use subtantially less
+ memory than if *preferSpeedOverMemory* is True. In my tests with
+ a 43000,64 array over all nonredundant pairs,
+ *preferSpeedOverMemory* = True delivered a 33% performance boost
+ on a 1.7GHZ Athlon with 512MB RAM compared with
+ *preferSpeedOverMemory* = False. But both solutions were more
+ than 10x faster than naively crunching all possible pairs through
+ :func:`cohere`.
- Defaults to true. If false, limits the caching by only making one, rather
- than two, complex cache arrays. This is useful if memory becomes critical.
- Even when preferSpeedOverMemory is false, cohere_pairs will still give
- significant performace gains over calling cohere for each pair, and will
- use subtantially less memory than if preferSpeedOverMemory is true. In my
- tests with a 43000,64 array over all nonredundant pairs,
- preferSpeedOverMemory=1 delivered a 33% performace boost on a 1.7GHZ Athlon
- with 512MB RAM compared with preferSpeedOverMemory=0. But both solutions
- were more than 10x faster than naievly crunching all possible pairs through
- cohere.
-
- Returns
- -------
+ Returns::
- (Cxy, Phase, freqs), where:
-
- Cxy: dictionary of (i,j) tuples -> coherence vector for that
- pair. Ie, Cxy[(i,j) = cohere(X[:,i], X[:,j]). Number of
- dictionary keys is len(ij)
+ (Cxy, Phase, freqs)
- Phase: dictionary of phases of the cross spectral density at
- each frequency for each pair. keys are (i,j).
+ where:
- freqs: vector of frequencies, equal in length to either the
- coherence or phase vectors for any i,j key.
+ - *Cxy*: dictionary of (*i*, *j*) tuples -> coherence vector for
+ that pair. I.e., ``Cxy[(i,j) = cohere(X[:,i], X[:,j])``.
+ Number of dictionary keys is ``len(ij)``.
- Eg, to make a coherence Bode plot:
+ - *Phase*: dictionary of phases of the cross spectral density at
+ each frequency for each pair. Keys are (*i*, *j*).
+ - *freqs*: vector of frequencies, equal in length to either the
+ coherence or phase vectors for any (*i*, *j*) key.
+
+ Eg., to make a coherence Bode plot::
+
subplot(211)
plot( freqs, Cxy[(12,19)])
subplot(212)
plot( freqs, Phase[(12,19)])
- For a large number of pairs, cohere_pairs can be much more
- efficient than just calling cohere for each pair, because it
- caches most of the intensive computations. If N is the number of
- pairs, this function is O(N) for most of the heavy lifting,
- whereas calling cohere for each pair is O(N^2). However, because
- of the caching, it is also more memory intensive, making 2
- additional complex arrays with approximately the same number of
- elements as X.
+ For a large number of pairs, :func:`cohere_pairs` can be much more
+ efficient than just calling :func:`cohere` for each pair, because
+ it caches most of the intensive computations. If :math:`N` is the
+ number of pairs, this function is :math:`O(N)` for most of the
+ heavy lifting, whereas calling cohere for each pair is
+ :math:`O(N^2)`. However, because of the caching, it is also more
+ memory intensive, making 2 additional complex arrays with
+ approximately the same number of elements as *X*.
- See test/cohere_pairs_test.py in the src tree for an example
- script that shows that this cohere_pairs and cohere give the same
- results for a given pair.
+ See :file:`test/cohere_pairs_test.py` in the src tree for an
+ example script that shows that this :func:`cohere_pairs` and
+ :func:`cohere` give the same results for a given pair.
- See also
- --------
- :func: psd
- """
+ .. sealso::
+
+ :func:`psd`
+ For information about the methods used to compute
+ :math:`P_{xy}`, :math:`P_{xx}` and :math:`P_{yy}`.
+ """
numRows, numCols = X.shape
# zero pad if X is too short
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: Eric F. <ef...@ha...> - 2009-08-25 18:28:01
|
md...@us... wrote: > Revision: 7567 > http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7567&view=rev > Author: mdboom > Date: 2009-08-25 15:31:10 +0000 (Tue, 25 Aug 2009) > > Log Message: > ----------- > Support Line2D objects without associated Axes objects. > > Modified Paths: > -------------- > branches/v0_99_maint/lib/matplotlib/lines.py > > Modified: branches/v0_99_maint/lib/matplotlib/lines.py > =================================================================== > --- branches/v0_99_maint/lib/matplotlib/lines.py 2009-08-25 11:54:24 UTC (rev 7566) > +++ branches/v0_99_maint/lib/matplotlib/lines.py 2009-08-25 15:31:10 UTC (rev 7567) > @@ -459,7 +459,7 @@ > self._y = self._xy[:, 1] # just a view > > self._subslice = False > - if len(x) > 100 and self._is_sorted(x): > + if self.axes and len(x) > 100 and self._is_sorted(x): > self._subslice = True > if hasattr(self, '_path'): > interpolation_steps = self._path._interpolation_steps > @@ -496,7 +496,7 @@ > def draw(self, renderer): > if self._invalid: > self.recache() > - if self._subslice: > + if self._subslice and self.axes: > # Need to handle monotonically decreasing case also... > x0, x1 = self.axes.get_xbound() > i0, = self._x.searchsorted([x0], 'left') Mike, I'm curious--why are both changes needed? Shouldn't the setting of self._subslice in the first chunk be enough? If not, it suggests that there are more general design problems here. Can a line object have an associated axes when it is created (or when data are fed to it) and then lose that axes attribute by the time draw() is called? If so, then it seems like the second chunk is the right one to keep, and the first one is useless. Eric |
|
From: <md...@us...> - 2009-08-25 15:32:19
|
Revision: 7568
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7568&view=rev
Author: mdboom
Date: 2009-08-25 15:32:13 +0000 (Tue, 25 Aug 2009)
Log Message:
-----------
Merged revisions 7567 via svnmerge from
https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v0_99_maint
........
r7567 | mdboom | 2009-08-25 11:31:10 -0400 (Tue, 25 Aug 2009) | 2 lines
Support Line2D objects without associated Axes objects.
........
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/lines.py
Property Changed:
----------------
trunk/matplotlib/
trunk/matplotlib/doc/pyplots/README
trunk/matplotlib/doc/sphinxext/gen_gallery.py
trunk/matplotlib/doc/sphinxext/gen_rst.py
trunk/matplotlib/examples/misc/multiprocess.py
trunk/matplotlib/examples/mplot3d/contour3d_demo.py
trunk/matplotlib/examples/mplot3d/contourf3d_demo.py
trunk/matplotlib/examples/mplot3d/polys3d_demo.py
trunk/matplotlib/examples/mplot3d/scatter3d_demo.py
trunk/matplotlib/examples/mplot3d/surface3d_demo.py
trunk/matplotlib/examples/mplot3d/wire3d_demo.py
trunk/matplotlib/lib/matplotlib/sphinxext/mathmpl.py
trunk/matplotlib/lib/matplotlib/sphinxext/only_directives.py
trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py
Property changes on: trunk/matplotlib
___________________________________________________________________
Modified: svnmerge-integrated
- /branches/mathtex:1-7263 /branches/v0_98_5_maint:1-7253 /branches/v0_99_maint:1-7541
+ /branches/mathtex:1-7263 /branches/v0_98_5_maint:1-7253 /branches/v0_99_maint:1-7567
Modified: svn:mergeinfo
- /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523
+ /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
Property changes on: trunk/matplotlib/doc/pyplots/README
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/doc/pyplots/README:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523
+ /branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/doc/pyplots/README:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
Property changes on: trunk/matplotlib/doc/sphinxext/gen_gallery.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/doc/sphinxext/gen_gallery.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523
+ /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/doc/sphinxext/gen_gallery.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
Property changes on: trunk/matplotlib/doc/sphinxext/gen_rst.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/doc/sphinxext/gen_rst.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523
+ /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/doc/sphinxext/gen_rst.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
Property changes on: trunk/matplotlib/examples/misc/multiprocess.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/examples/misc/log.py:5753-5771
/branches/v0_98_5_maint/examples/misc/log.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/misc/multiprocess.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523
+ /branches/v0_91_maint/examples/misc/log.py:5753-5771
/branches/v0_98_5_maint/examples/misc/log.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/misc/multiprocess.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
Property changes on: trunk/matplotlib/examples/mplot3d/contour3d_demo.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/examples/mplot3d/contour.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/contour.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/contour3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523
+ /branches/v0_91_maint/examples/mplot3d/contour.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/contour.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/contour3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
Property changes on: trunk/matplotlib/examples/mplot3d/contourf3d_demo.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/examples/mplot3d/contourf.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/contourf.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/contourf3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523
+ /branches/v0_91_maint/examples/mplot3d/contourf.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/contourf.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/contourf3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
Property changes on: trunk/matplotlib/examples/mplot3d/polys3d_demo.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/examples/mplot3d/polys.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/polys.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/polys3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523
+ /branches/v0_91_maint/examples/mplot3d/polys.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/polys.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/polys3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
Property changes on: trunk/matplotlib/examples/mplot3d/scatter3d_demo.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/examples/mplot3d/scatter.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/scatter.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/scatter3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523
+ /branches/v0_91_maint/examples/mplot3d/scatter.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/scatter.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/scatter3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
Property changes on: trunk/matplotlib/examples/mplot3d/surface3d_demo.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/examples/mplot3d/surface.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/surface.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/surface3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523
+ /branches/v0_91_maint/examples/mplot3d/surface.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/surface.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/surface3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
Property changes on: trunk/matplotlib/examples/mplot3d/wire3d_demo.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/examples/mplot3d/wire.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/wire.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/wire3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523
+ /branches/v0_91_maint/examples/mplot3d/wire.py:5753-5771
/branches/v0_98_5_maint/examples/mplot3d/wire.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080
/branches/v0_99_maint/examples/mplot3d/wire3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
Modified: trunk/matplotlib/lib/matplotlib/lines.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/lines.py 2009-08-25 15:31:10 UTC (rev 7567)
+++ trunk/matplotlib/lib/matplotlib/lines.py 2009-08-25 15:32:13 UTC (rev 7568)
@@ -453,7 +453,7 @@
self._y = self._xy[:, 1] # just a view
self._subslice = False
- if len(x) > 100 and self._is_sorted(x):
+ if self.axes and len(x) > 100 and self._is_sorted(x):
self._subslice = True
if hasattr(self, '_path'):
interpolation_steps = self._path._interpolation_steps
@@ -490,7 +490,7 @@
def draw(self, renderer):
if self._invalid:
self.recache()
- if self._subslice:
+ if self._subslice and self.axes:
# Need to handle monotonically decreasing case also...
x0, x1 = self.axes.get_xbound()
i0, = self._x.searchsorted([x0], 'left')
Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/mathmpl.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/sphinxext/mathmpl.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/mathmpl.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/lib/matplotlib/sphinxext/mathmpl.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523
+ /branches/v0_91_maint/doc/sphinxext/mathmpl.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/mathmpl.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/lib/matplotlib/sphinxext/mathmpl.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/only_directives.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/sphinxext/only_directives.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/only_directives.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/lib/matplotlib/sphinxext/only_directives.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523
+ /branches/v0_91_maint/doc/sphinxext/only_directives.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/only_directives.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/lib/matplotlib/sphinxext/only_directives.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/sphinxext/plot_directive.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/plot_directive.py:6920-6925,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/lib/matplotlib/sphinxext/plot_directive.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523
+ /branches/v0_91_maint/doc/sphinxext/plot_directive.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/plot_directive.py:6920-6925,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/lib/matplotlib/sphinxext/plot_directive.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2009-08-25 15:31:19
|
Revision: 7567
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7567&view=rev
Author: mdboom
Date: 2009-08-25 15:31:10 +0000 (Tue, 25 Aug 2009)
Log Message:
-----------
Support Line2D objects without associated Axes objects.
Modified Paths:
--------------
branches/v0_99_maint/lib/matplotlib/lines.py
Modified: branches/v0_99_maint/lib/matplotlib/lines.py
===================================================================
--- branches/v0_99_maint/lib/matplotlib/lines.py 2009-08-25 11:54:24 UTC (rev 7566)
+++ branches/v0_99_maint/lib/matplotlib/lines.py 2009-08-25 15:31:10 UTC (rev 7567)
@@ -459,7 +459,7 @@
self._y = self._xy[:, 1] # just a view
self._subslice = False
- if len(x) > 100 and self._is_sorted(x):
+ if self.axes and len(x) > 100 and self._is_sorted(x):
self._subslice = True
if hasattr(self, '_path'):
interpolation_steps = self._path._interpolation_steps
@@ -496,7 +496,7 @@
def draw(self, renderer):
if self._invalid:
self.recache()
- if self._subslice:
+ if self._subslice and self.axes:
# Need to handle monotonically decreasing case also...
x0, x1 = self.axes.get_xbound()
i0, = self._x.searchsorted([x0], 'left')
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2009-08-25 11:54:34
|
Revision: 7566
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7566&view=rev
Author: jswhit
Date: 2009-08-25 11:54:24 +0000 (Tue, 25 Aug 2009)
Log Message:
-----------
add lonmin, lonmax instance vars
Modified Paths:
--------------
trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2009-08-25 02:15:45 UTC (rev 7565)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2009-08-25 11:54:24 UTC (rev 7566)
@@ -737,13 +737,19 @@
if projection in _cylproj:
self.latmin = self.llcrnrlat
self.latmax = self.urcrnrlat
+ self.lonmin = self.llcrnrlon
+ self.lonmax = self.urcrnrlon
elif projection in ['ortho','geos'] + _pseudocyl:
self.latmin = -90.
self.latmax = 90.
+ self.lonmin = self.llcrnrlon
+ self.lonmax = self.urcrnrlon
else:
- lons, lats = self.makegrid(101,101)
+ lons, lats = self.makegrid(1001,1001)
self.latmin = lats.min()
self.latmax = lats.max()
+ self.lonmin = lons.min()
+ self.lonmax = lons.max()
# if ax == None, pyplot.gca may be used.
self.ax = ax
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2009-08-25 02:15:54
|
Revision: 7565
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7565&view=rev
Author: jswhit
Date: 2009-08-25 02:15:45 +0000 (Tue, 25 Aug 2009)
Log Message:
-----------
change default color
Modified Paths:
--------------
trunk/toolkits/basemap/examples/daynight.py
Modified: trunk/toolkits/basemap/examples/daynight.py
===================================================================
--- trunk/toolkits/basemap/examples/daynight.py 2009-08-25 00:42:54 UTC (rev 7564)
+++ trunk/toolkits/basemap/examples/daynight.py 2009-08-25 02:15:45 UTC (rev 7565)
@@ -64,7 +64,7 @@
return lons2,lats2,daynight
class Basemap2(Basemap):
- def nightshade(self,date,color="0.5",nlons=1441,alpha=0.5,zorder=None):
+ def nightshade(self,date,color="k",nlons=1441,alpha=0.5,zorder=None):
# create grid of day=0, night=1
# 1441 means use a 0.25 degree grid.
lons,lats,daynight = daynightgrid(date,nlons)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2009-08-25 00:43:07
|
Revision: 7564
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7564&view=rev
Author: jswhit
Date: 2009-08-25 00:42:54 +0000 (Tue, 25 Aug 2009)
Log Message:
-----------
fix errors introduced by previous commit
Modified Paths:
--------------
trunk/toolkits/basemap/examples/daynight.py
Modified: trunk/toolkits/basemap/examples/daynight.py
===================================================================
--- trunk/toolkits/basemap/examples/daynight.py 2009-08-24 23:32:07 UTC (rev 7563)
+++ trunk/toolkits/basemap/examples/daynight.py 2009-08-25 00:42:54 UTC (rev 7564)
@@ -20,7 +20,7 @@
jday = netcdftime.JulianDayFromDate(date)
jd = np.floor(jday) # truncate to integer.
# utc hour.
- ut = d.hour + d.minute/60. + d.second/3600.
+ ut = date.hour + date.minute/60. + date.second/3600.
# calculate number of centuries from J2000
t = (jd + (ut/24.) - 2451545.0) / 36525.
# mean longitude corrected for aberration
@@ -94,6 +94,7 @@
# shade the night areas gray, with alpha transparency so the
# map shows through.
# use current time in UTC.
-CS=map.nightshade(datetime.utcnow())
-plt.title('Day/Night Map for %s (UTC)' %d )
+date = datetime.utcnow()
+CS=map.nightshade(date)
+plt.title('Day/Night Map for %s (UTC)' % date)
plt.show()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2009-08-24 23:32:16
|
Revision: 7563
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7563&view=rev
Author: jswhit
Date: 2009-08-24 23:32:07 +0000 (Mon, 24 Aug 2009)
Log Message:
-----------
pass date to nightshade method
Modified Paths:
--------------
trunk/toolkits/basemap/examples/daynight.py
Modified: trunk/toolkits/basemap/examples/daynight.py
===================================================================
--- trunk/toolkits/basemap/examples/daynight.py 2009-08-24 22:45:15 UTC (rev 7562)
+++ trunk/toolkits/basemap/examples/daynight.py 2009-08-24 23:32:07 UTC (rev 7563)
@@ -64,10 +64,10 @@
return lons2,lats2,daynight
class Basemap2(Basemap):
- def nightshade(self,color="0.5",nlons=1441,alpha=0.5,zorder=None):
+ def nightshade(self,date,color="0.5",nlons=1441,alpha=0.5,zorder=None):
# create grid of day=0, night=1
# 1441 means use a 0.25 degree grid.
- lons,lats,daynight = daynightgrid(d,nlons)
+ lons,lats,daynight = daynightgrid(date,nlons)
x,y = self(lons,lats)
# contour the day-night grid, coloring the night area
# with the specified color and transparency.
@@ -81,8 +81,6 @@
c.set_zorder(zorder)
return CS
-# current time in UTC.
-d = datetime.utcnow()
# miller projection
map = Basemap2(projection='mill',lon_0=0)
@@ -95,6 +93,7 @@
map.fillcontinents(color='coral',lake_color='aqua')
# shade the night areas gray, with alpha transparency so the
# map shows through.
-CS=map.nightshade()
+# use current time in UTC.
+CS=map.nightshade(datetime.utcnow())
plt.title('Day/Night Map for %s (UTC)' %d )
plt.show()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2009-08-24 23:14:11
|
Revision: 7560
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7560&view=rev
Author: jswhit
Date: 2009-08-24 22:20:10 +0000 (Mon, 24 Aug 2009)
Log Message:
-----------
make night area darker.
Modified Paths:
--------------
trunk/toolkits/basemap/examples/daynight.py
Modified: trunk/toolkits/basemap/examples/daynight.py
===================================================================
--- trunk/toolkits/basemap/examples/daynight.py 2009-08-24 22:18:05 UTC (rev 7559)
+++ trunk/toolkits/basemap/examples/daynight.py 2009-08-24 22:20:10 UTC (rev 7560)
@@ -81,6 +81,6 @@
x,y = map(lons, lats)
# contour this grid with 1 contour level, specifying color for night areas.
# Use alpha transparency so map shows through.
-CS=map.contourf(x,y,daynight,1,colors=['0.7'],alpha=0.5)
+CS=map.contourf(x,y,daynight,1,colors=['0.5'],alpha=0.5)
plt.title('Day/Night Map for %s (UTC)' %d )
plt.show()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|