|
From: <jd...@us...> - 2008-10-15 12:43:57
|
Revision: 6202
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6202&view=rev
Author: jdh2358
Date: 2008-10-15 12:43:41 +0000 (Wed, 15 Oct 2008)
Log Message:
-----------
example updates
Modified Paths:
--------------
trunk/matplotlib/examples/api/date_demo.py
trunk/matplotlib/examples/data/aapl.csv
trunk/matplotlib/examples/pylab_examples/pie_demo.py
trunk/matplotlib/examples/pylab_examples/scatter_demo2.py
trunk/matplotlib/examples/pylab_examples/simple_plot.py
trunk/matplotlib/examples/pylab_examples/subplot_demo.py
trunk/matplotlib/examples/pylab_examples/table_demo.py
trunk/matplotlib/setup.py
Added Paths:
-----------
trunk/matplotlib/examples/data/goog.csv
trunk/matplotlib/examples/data/msft_nasdaq_d.csv
trunk/matplotlib/examples/pylab_examples/finance_work2.py
Modified: trunk/matplotlib/examples/api/date_demo.py
===================================================================
--- trunk/matplotlib/examples/api/date_demo.py 2008-10-15 12:35:23 UTC (rev 6201)
+++ trunk/matplotlib/examples/api/date_demo.py 2008-10-15 12:43:41 UTC (rev 6202)
@@ -1,14 +1,47 @@
+#!/usr/bin/env python
"""
-Simple example showing how to plot a time series with datetime objects
+Show how to make date plots in matplotlib using date tick locators and
+formatters. See major_minor_demo1.py for more information on
+controlling major and minor ticks
+
+All matplotlib date plotting is done by converting date instances into
+days since the 0001-01-01 UTC. The conversion, tick locating and
+formatting is done behind the scenes so this is most transparent to
+you. The dates module provides several converter functions date2num
+and num2date
+
"""
+
import datetime
import matplotlib.pyplot as plt
+import matplotlib.dates as mdates
+import matplotlib.mlab as mlab
-today = datetime.date.today()
-dates = [today+datetime.timedelta(days=i) for i in range(10)]
+years = mdates.YearLocator() # every year
+months = mdates.MonthLocator() # every month
+yearsFmt = mdates.DateFormatter('%Y')
+r = mlab.csv2rec('../data/goog.csv')
+r.sort()
+
fig = plt.figure()
ax = fig.add_subplot(111)
-ax.plot(dates, range(10))
+ax.plot(r.date, r.adj_close)
+
+# format the ticks
+ax.xaxis.set_major_locator(years)
+ax.xaxis.set_major_formatter(yearsFmt)
+ax.xaxis.set_minor_locator(months)
+ax.autoscale_view()
+
+# format the coords message box
+def price(x): return '$%1.2f'%x
+ax.format_xdata = mdates.DateFormatter('%Y-%m-%d')
+ax.format_ydata = price
+ax.grid(True)
+
+# rotates and right aligns the x labels, and moves the bottom of the
+# axes up to make room for them
fig.autofmt_xdate()
+
plt.show()
Modified: trunk/matplotlib/examples/data/aapl.csv
===================================================================
--- trunk/matplotlib/examples/data/aapl.csv 2008-10-15 12:35:23 UTC (rev 6201)
+++ trunk/matplotlib/examples/data/aapl.csv 2008-10-15 12:43:41 UTC (rev 6202)
@@ -1,64 +1,231 @@
Date,Open,High,Low,Close,Volume,Adj Close
-2008-02-15,126.27,127.08,124.06,124.63,32163400,124.63
+2008-10-14,116.26,116.40,103.14,104.08,70749800,104.08
+2008-10-13,104.55,110.53,101.02,110.26,54967000,110.26
+2008-10-10,85.70,100.00,85.00,96.80,79260700,96.80
+2008-10-09,93.35,95.80,86.60,88.74,57763700,88.74
+2008-10-08,85.91,96.33,85.68,89.79,78847900,89.79
+2008-10-07,100.48,101.50,88.95,89.16,67099000,89.16
+2008-10-06,91.96,98.78,87.54,98.14,75264900,98.14
+2008-10-03,104.00,106.50,94.65,97.07,81942800,97.07
+2008-10-02,108.01,108.79,100.00,100.10,57477300,100.10
+2008-10-01,111.92,112.36,107.39,109.12,46303000,109.12
+2008-09-30,108.25,115.00,106.30,113.66,58095800,113.66
+2008-09-29,119.62,119.68,100.59,105.26,93581400,105.26
+2008-09-26,124.91,129.80,123.00,128.24,40208700,128.24
+2008-09-25,129.80,134.79,128.52,131.93,35865600,131.93
+2008-09-24,127.27,130.95,125.15,128.71,37393400,128.71
+2008-09-23,131.85,135.80,126.66,126.84,45727300,126.84
+2008-09-22,139.94,140.25,130.66,131.05,30577300,131.05
+2008-09-19,142.60,144.20,136.31,140.91,51102700,140.91
+2008-09-18,130.57,135.43,120.68,134.09,59819300,134.09
+2008-09-17,138.49,138.51,127.83,127.83,42847200,127.83
+2008-09-16,133.86,142.50,132.15,139.88,42804800,139.88
+2008-09-15,142.03,147.69,140.36,140.36,32852600,140.36
+2008-09-12,150.91,150.91,146.50,148.94,28322400,148.94
+2008-09-11,148.18,152.99,146.00,152.65,34666800,152.65
+2008-09-10,152.32,154.99,148.80,151.61,34755100,151.61
+2008-09-09,156.86,159.96,149.79,151.68,44442500,151.68
+2008-09-08,164.57,164.89,151.46,157.92,37356400,157.92
+2008-09-05,158.59,162.40,157.65,160.18,28083800,160.18
+2008-09-04,165.86,167.91,160.81,161.22,26549500,161.22
+2008-09-03,166.84,168.68,164.00,166.96,26244100,166.96
+2008-09-02,172.40,173.50,165.00,166.19,27884400,166.19
+2008-08-29,172.96,173.50,169.04,169.53,21403200,169.53
+2008-08-28,175.28,176.25,172.75,173.74,15394500,173.74
+2008-08-27,173.31,175.76,172.19,174.67,17045900,174.67
+2008-08-26,172.76,174.88,172.61,173.64,15912500,173.64
+2008-08-25,176.15,176.23,171.66,172.55,17300900,172.55
+2008-08-22,175.82,177.50,175.57,176.79,15700400,176.79
+2008-08-21,174.47,175.45,171.89,174.29,19276600,174.29
+2008-08-20,174.77,176.94,173.61,175.84,18105400,175.84
+2008-08-19,174.54,177.07,171.81,173.53,21997000,173.53
+2008-08-18,175.57,177.81,173.82,175.39,19691200,175.39
+2008-08-15,179.04,179.75,175.05,175.74,25294700,175.74
+2008-08-14,178.33,180.45,177.84,179.32,25393200,179.32
+2008-08-13,177.98,180.00,175.90,179.30,30083800,179.30
+2008-08-12,173.52,179.29,173.51,176.73,29867100,176.73
+2008-08-11,170.07,176.50,169.67,173.56,31821100,173.56
+2008-08-08,163.86,169.65,163.75,169.55,25499900,169.55
+2008-08-07,162.71,166.15,161.50,163.57,24013300,163.57
+2008-08-06,159.97,167.40,158.00,164.19,28264600,164.19
+2008-08-05,155.42,160.80,154.82,160.64,24584700,160.64
+2008-08-04,156.60,157.90,152.91,153.23,21161700,153.23
+2008-08-01,159.90,159.99,155.75,156.66,19451400,156.66
+2008-07-31,157.54,162.20,156.98,158.95,22767800,158.95
+2008-07-30,157.78,160.49,156.08,159.88,25899400,159.88
+2008-07-29,155.41,159.45,153.65,157.08,24431100,157.08
+2008-07-28,162.34,162.47,154.02,154.40,27882600,154.40
+2008-07-25,160.40,163.00,158.65,162.12,22629900,162.12
+2008-07-24,164.32,165.26,158.45,159.03,29986400,159.03
+2008-07-23,164.99,168.37,161.56,166.26,37920300,166.26
+2008-07-22,149.00,162.76,146.53,162.02,67128300,162.02
+2008-07-21,166.90,167.50,161.12,166.29,48588200,166.29
+2008-07-18,168.52,169.65,165.00,165.15,31014800,165.15
+2008-07-17,174.10,174.98,171.39,171.81,27054500,171.81
+2008-07-16,170.20,172.93,168.60,172.81,26706800,172.81
+2008-07-15,172.48,173.74,166.39,169.64,37144400,169.64
+2008-07-14,179.24,179.30,173.08,173.88,31644800,173.88
+2008-07-11,175.47,177.11,171.00,172.58,33214700,172.58
+2008-07-10,174.92,177.34,171.37,176.63,30024600,176.63
+2008-07-09,180.20,180.91,174.14,174.25,31992000,174.25
+2008-07-08,175.40,179.70,172.74,179.55,31726800,179.55
+2008-07-07,173.16,177.13,171.90,175.16,29299700,175.16
+2008-07-03,169.59,172.17,165.75,170.12,18691500,170.12
+2008-07-02,175.20,177.45,168.18,168.18,29911400,168.18
+2008-07-01,164.23,174.72,164.00,174.68,39688600,174.68
+2008-06-30,170.19,172.00,166.62,167.44,24435600,167.44
+2008-06-27,166.51,170.57,164.15,170.09,37223200,170.09
+2008-06-26,174.07,174.84,168.01,168.26,31057500,168.26
+2008-06-25,174.61,178.83,173.88,177.39,23016100,177.39
+2008-06-24,172.37,175.78,171.63,173.25,22212400,173.25
+2008-06-23,174.74,175.88,171.56,173.16,23063600,173.16
+2008-06-20,179.35,181.00,175.00,175.27,31727400,175.27
+2008-06-19,178.55,182.34,176.80,180.90,28283900,180.90
+2008-06-18,181.12,182.20,177.35,178.75,28981000,178.75
+2008-06-17,178.10,181.99,177.41,181.43,32130600,181.43
+2008-06-16,171.30,177.90,169.07,176.84,37561800,176.84
+2008-06-13,171.64,174.16,165.31,172.37,48069900,172.37
+2008-06-12,181.49,182.60,171.20,173.26,46726200,173.26
+2008-06-11,184.34,186.00,179.59,180.81,34341100,180.81
+2008-06-10,180.51,186.78,179.02,185.64,40728600,185.64
+2008-06-09,184.79,184.94,175.75,181.61,67442600,181.61
+2008-06-06,188.00,189.95,185.55,185.64,34438700,185.64
+2008-06-05,186.34,189.84,185.70,189.43,26980200,189.43
+2008-06-04,184.02,187.09,183.23,185.19,25963700,185.19
+2008-06-03,186.86,188.20,182.34,185.37,26804300,185.37
+2008-06-02,188.60,189.65,184.53,186.10,24280000,186.10
+2008-05-30,187.45,189.54,187.38,188.75,21792300,188.75
+2008-05-29,186.76,188.20,185.50,186.69,23113800,186.69
+2008-05-28,187.41,187.95,183.72,187.01,26570700,187.01
+2008-05-27,182.75,186.43,181.84,186.43,28210900,186.43
+2008-05-23,180.77,181.99,177.80,181.17,32389900,181.17
+2008-05-22,179.26,181.33,172.00,177.05,43097700,177.05
+2008-05-21,185.67,187.95,176.25,178.19,41344900,178.19
+2008-05-20,181.82,186.16,180.12,185.90,34637500,185.90
+2008-05-19,187.86,188.69,181.30,183.60,33779300,183.60
+2008-05-16,190.11,190.30,187.00,187.62,27348900,187.62
+2008-05-15,186.81,189.90,184.20,189.73,31186000,189.73
+2008-05-14,191.23,192.24,185.57,186.26,32743700,186.26
+2008-05-13,188.61,191.45,187.86,189.96,29401300,189.96
+2008-05-12,185.21,188.87,182.85,188.16,29234400,188.16
+2008-05-09,183.16,184.25,181.37,183.45,24038300,183.45
+2008-05-08,183.77,186.50,183.07,185.06,32110200,185.06
+2008-05-07,186.05,188.20,180.54,182.59,41326200,182.59
+2008-05-06,184.66,187.12,182.18,186.66,32816800,186.66
+2008-05-05,181.92,185.31,181.05,184.73,30519900,184.73
+2008-05-02,180.19,181.92,178.55,180.94,35931500,180.94
+2008-05-01,174.96,180.00,174.86,180.00,32270600,180.00
+2008-04-30,176.19,180.00,172.92,173.95,40697300,173.95
+2008-04-29,171.11,175.66,170.25,175.05,32981300,175.05
+2008-04-28,169.75,173.75,169.13,172.24,28114800,172.24
+2008-04-25,170.70,171.10,166.42,169.73,35445500,169.73
+2008-04-24,165.34,169.98,159.19,168.94,60573800,168.94
+2008-04-23,164.05,164.84,161.08,162.89,53721100,162.89
+2008-04-22,167.40,168.00,158.09,160.20,51413300,160.20
+2008-04-21,162.21,168.50,161.76,168.16,37112600,168.16
+2008-04-18,159.12,162.26,158.38,161.04,36670200,161.04
+2008-04-17,154.17,156.00,153.35,154.49,25152400,154.49
+2008-04-16,151.72,154.10,150.62,153.70,28420500,153.70
+2008-04-15,149.40,149.72,145.72,148.38,24929900,148.38
+2008-04-14,146.77,149.25,144.54,147.78,30181700,147.78
+2008-04-11,152.72,153.30,146.40,147.14,43217000,147.14
+2008-04-10,151.13,155.42,150.60,154.55,34134400,154.55
+2008-04-09,153.31,153.89,150.46,151.44,31192800,151.44
+2008-04-08,153.55,156.45,152.32,152.84,36224800,152.84
+2008-04-07,156.13,159.69,155.11,155.89,41368800,155.89
+2008-04-04,152.19,154.71,150.75,153.08,30514900,153.08
+2008-04-03,147.06,153.63,147.00,151.61,37556000,151.61
+2008-04-02,148.78,151.20,145.85,147.49,37320300,147.49
+2008-04-01,146.30,149.66,143.61,149.53,36877400,149.53
+2008-03-31,143.27,145.71,142.52,143.50,27430900,143.50
+2008-03-28,141.80,144.65,141.60,143.01,25521800,143.01
+2008-03-27,144.95,145.31,139.99,140.25,35708200,140.25
+2008-03-26,140.87,145.74,140.64,145.06,42217300,145.06
+2008-03-25,139.96,143.10,137.33,140.98,37585400,140.98
+2008-03-24,134.01,140.85,133.64,139.53,38104300,139.53
+2008-03-20,131.12,133.29,129.18,133.27,32456700,133.27
+2008-03-19,133.12,134.29,129.67,129.67,36090600,129.67
+2008-03-18,129.18,133.00,128.67,132.82,43040000,132.82
+2008-03-17,122.55,128.59,122.55,126.73,38307100,126.73
+2008-03-14,129.88,130.30,124.20,126.61,41308600,126.61
+2008-03-13,124.10,129.50,123.00,127.94,45075100,127.94
+2008-03-12,127.04,128.68,125.17,126.03,37843900,126.03
+2008-03-11,124.10,127.48,122.00,127.35,41569400,127.35
+2008-03-10,121.98,123.46,119.37,119.69,35699600,119.69
+2008-03-07,120.41,122.98,119.05,122.25,43945100,122.25
+2008-03-06,124.61,127.50,120.81,120.93,52632100,120.93
+2008-03-05,123.58,125.14,122.25,124.49,43637000,124.49
+2008-03-04,121.99,124.88,120.40,124.62,63763700,124.62
+2008-03-03,124.44,125.98,118.00,121.73,56894400,121.73
+2008-02-29,129.29,130.21,124.80,125.02,44838600,125.02
+2008-02-28,127.20,132.20,125.77,129.91,57794800,129.91
+2008-02-27,118.23,123.05,118.09,122.96,52683500,122.96
+2008-02-26,117.64,121.09,115.44,119.15,53746000,119.15
+2008-02-25,118.59,120.17,116.66,119.74,44884800,119.74
+2008-02-22,122.48,122.51,115.87,119.46,54638500,119.46
+2008-02-21,126.05,126.47,120.86,121.54,33504100,121.54
+2008-02-20,122.20,124.60,121.68,123.82,34551400,123.82
+2008-02-19,125.99,126.75,121.44,122.18,35894500,122.18
+2008-02-15,126.27,127.08,124.06,124.63,32189300,124.63
2008-02-14,129.40,130.80,127.01,127.46,34074900,127.46
-2008-02-13,126.68,129.78,125.63,129.40,34542300,129.40
-2008-02-12,130.70,131.00,123.62,124.86,43749900,124.86
-2008-02-11,128.01,129.98,127.20,129.45,42886900,129.45
-2008-02-08,122.08,125.70,121.60,125.48,48412700,125.48
+2008-02-13,126.68,129.78,125.63,129.40,34590500,129.40
+2008-02-12,130.70,131.00,123.62,124.86,43785000,124.86
+2008-02-11,128.01,129.98,127.20,129.45,42908300,129.45
+2008-02-08,122.08,125.70,121.60,125.48,48427600,125.48
2008-02-07,119.97,124.78,117.27,121.24,74404700,121.24
-2008-02-06,130.83,131.92,121.77,122.00,56093900,122.00
-2008-02-05,130.43,134.00,128.90,129.36,40723400,129.36
-2008-02-04,134.21,135.90,131.42,131.65,32103400,131.65
-2008-02-01,136.24,136.59,132.18,133.75,36085400,133.75
-2008-01-31,129.45,136.65,129.40,135.36,48004500,135.36
-2008-01-30,131.37,135.45,130.00,132.18,44323500,132.18
-2008-01-29,131.15,132.79,129.05,131.54,39269800,131.54
-2008-01-28,128.16,133.20,126.45,130.01,52628400,130.01
-2008-01-25,138.99,139.09,129.61,130.01,55440400,130.01
-2008-01-24,139.99,140.70,132.01,135.60,71564900,135.60
-2008-01-23,136.19,140.00,126.14,139.07,120415200,139.07
-2008-01-22,148.06,159.98,146.00,155.64,86214800,155.64
-2008-01-18,161.71,165.75,159.61,161.36,61547400,161.36
+2008-02-06,130.83,131.92,121.77,122.00,56188300,122.00
+2008-02-05,130.43,134.00,128.90,129.36,40751500,129.36
+2008-02-04,134.21,135.90,131.42,131.65,32115500,131.65
+2008-02-01,136.24,136.59,132.18,133.75,36098000,133.75
+2008-01-31,129.45,136.65,129.40,135.36,48059800,135.36
+2008-01-30,131.37,135.45,130.00,132.18,44394700,132.18
+2008-01-29,131.15,132.79,129.05,131.54,39285100,131.54
+2008-01-28,128.16,133.20,126.45,130.01,52673000,130.01
+2008-01-25,138.99,139.09,129.61,130.01,55526400,130.01
+2008-01-24,139.99,140.70,132.01,135.60,71638100,135.60
+2008-01-23,136.19,140.00,126.14,139.07,120463200,139.07
+2008-01-22,148.06,159.98,146.00,155.64,86955500,155.64
+2008-01-18,161.71,165.75,159.61,161.36,61583700,161.36
2008-01-17,161.51,165.36,158.42,160.89,62780700,160.89
2008-01-16,165.23,169.01,156.70,159.64,79065900,159.64
2008-01-15,177.72,179.22,164.66,169.04,83688500,169.04
-2008-01-14,177.52,179.42,175.17,178.78,39256900,178.78
-2008-01-11,176.00,177.85,170.00,172.69,43936100,172.69
-2008-01-10,177.58,181.00,175.41,178.02,52904500,178.02
+2008-01-14,177.52,179.42,175.17,178.78,39301800,178.78
+2008-01-11,176.00,177.85,170.00,172.69,44010200,172.69
+2008-01-10,177.58,181.00,175.41,178.02,52963400,178.02
2008-01-09,171.30,179.50,168.30,179.40,64781500,179.40
-2008-01-08,180.14,182.46,170.80,171.25,54338200,171.25
-2008-01-07,181.25,183.60,170.23,177.64,73972900,177.64
-2008-01-04,191.45,193.00,178.89,180.05,51959400,180.05
-2008-01-03,195.41,197.39,192.69,194.93,30052300,194.93
-2008-01-02,199.27,200.26,192.55,194.84,38519200,194.84
-2007-12-31,199.50,200.50,197.75,198.08,19249800,198.08
-2007-12-28,200.59,201.56,196.88,199.83,24766200,199.83
-2007-12-27,198.95,202.96,197.80,198.57,28383000,198.57
-2007-12-26,199.01,200.96,196.82,198.95,25110500,198.95
+2008-01-08,180.14,182.46,170.80,171.25,54422000,171.25
+2008-01-07,181.25,183.60,170.23,177.64,74006900,177.64
+2008-01-04,191.45,193.00,178.89,180.05,51994000,180.05
+2008-01-03,195.41,197.39,192.69,194.93,30073800,194.93
+2008-01-02,199.27,200.26,192.55,194.84,38542100,194.84
+2007-12-31,199.50,200.50,197.75,198.08,19261900,198.08
+2007-12-28,200.59,201.56,196.88,199.83,24987400,199.83
+2007-12-27,198.95,202.96,197.80,198.57,28411700,198.57
+2007-12-26,199.01,200.96,196.82,198.95,25133300,198.95
2007-12-24,195.03,199.33,194.79,198.80,17150100,198.80
2007-12-21,190.12,193.91,189.89,193.91,35498600,193.91
-2007-12-20,185.43,187.83,183.33,187.21,27603200,187.21
-2007-12-19,182.98,184.64,180.90,183.12,29484300,183.12
-2007-12-18,186.52,187.33,178.60,182.98,43649200,182.98
-2007-12-17,190.72,192.65,182.98,184.40,36556700,184.40
+2007-12-20,185.43,187.83,183.33,187.21,27644900,187.21
+2007-12-19,182.98,184.64,180.90,183.12,29552800,183.12
+2007-12-18,186.52,187.33,178.60,182.98,43664400,182.98
+2007-12-17,190.72,192.65,182.98,184.40,36596200,184.40
2007-12-14,190.37,193.20,189.54,190.39,24082600,190.39
2007-12-13,190.19,192.12,187.82,191.83,30879200,191.83
-2007-12-12,193.44,194.48,185.76,190.86,43696200,190.86
-2007-12-11,194.75,196.83,187.39,188.54,39589700,188.54
-2007-12-10,193.59,195.66,192.69,194.21,25776800,194.21
-2007-12-07,190.54,194.99,188.04,194.30,38057700,194.30
+2007-12-12,193.44,194.48,185.76,190.86,43773600,190.86
+2007-12-11,194.75,196.83,187.39,188.54,39675900,188.54
+2007-12-10,193.59,195.66,192.69,194.21,25799200,194.21
+2007-12-07,190.54,194.99,188.04,194.30,38073800,194.30
2007-12-06,186.19,190.10,186.12,189.95,32136100,189.95
-2007-12-05,182.89,186.00,182.41,185.50,31833300,185.50
-2007-12-04,177.15,180.90,176.99,179.81,27625500,179.81
-2007-12-03,181.86,184.14,177.70,178.86,34308100,178.86
-2007-11-30,187.34,187.70,179.70,182.22,42400500,182.22
-2007-11-29,179.43,185.17,179.15,184.29,37413100,184.29
-2007-11-28,176.82,180.60,175.35,180.22,41073100,180.22
-2007-11-27,175.22,175.79,170.01,174.81,47005000,174.81
-2007-11-26,173.59,177.27,172.35,172.54,46603400,172.54
-2007-11-23,172.00,172.05,169.75,171.54,16622500,171.54
+2007-12-05,182.89,186.00,182.41,185.50,31871500,185.50
+2007-12-04,177.15,180.90,176.99,179.81,27635700,179.81
+2007-12-03,181.86,184.14,177.70,178.86,34338200,178.86
+2007-11-30,187.34,187.70,179.70,182.22,42421500,182.22
+2007-11-29,179.43,185.17,179.15,184.29,37533100,184.29
+2007-11-28,176.82,180.60,175.35,180.22,41104000,180.22
+2007-11-27,175.22,175.79,170.01,174.81,47036800,174.81
+2007-11-26,173.59,177.27,172.35,172.54,46634100,172.54
+2007-11-23,172.00,172.05,169.75,171.54,16634200,171.54
2007-11-21,165.84,172.35,164.67,168.46,43493200,168.46
-2007-11-20,165.67,171.79,163.53,168.85,55076200,168.85
+2007-11-20,165.67,171.79,163.53,168.85,55130100,168.85
2007-11-19,166.10,168.20,162.10,163.95,41196800,163.95
2007-11-16,165.30,167.02,159.33,166.39,49391300,166.39
2007-11-15,166.39,169.59,160.30,164.30,53095600,164.30
@@ -68,44 +235,44 @@
2007-11-09,171.15,175.12,165.21,165.37,54458700,165.37
2007-11-08,186.67,186.90,167.77,175.47,67458500,175.47
2007-11-07,190.61,192.68,186.13,186.30,35473400,186.30
-2007-11-06,187.05,192.00,185.27,191.79,34068500,191.79
-2007-11-05,185.29,188.96,184.24,186.18,28703700,186.18
-2007-11-02,189.21,189.44,183.49,187.87,35769600,187.87
-2007-11-01,188.60,190.10,180.00,187.44,28734100,187.44
-2007-10-31,187.63,190.12,184.95,189.95,29699700,189.95
-2007-10-30,186.18,189.37,184.73,187.00,33495900,187.00
-2007-10-29,185.45,186.59,184.70,185.09,19281800,185.09
+2007-11-06,187.05,192.00,185.27,191.79,34097400,191.79
+2007-11-05,185.29,188.96,184.24,186.18,28720600,186.18
+2007-11-02,189.21,189.44,183.49,187.87,35789800,187.87
+2007-11-01,188.60,190.10,180.00,187.44,28751300,187.44
+2007-10-31,187.63,190.12,184.95,189.95,29761100,189.95
+2007-10-30,186.18,189.37,184.73,187.00,33550500,187.00
+2007-10-29,185.45,186.59,184.70,185.09,19305500,185.09
2007-10-26,185.29,185.37,182.88,184.70,25219800,184.70
-2007-10-25,184.87,185.90,181.66,182.78,34729500,182.78
-2007-10-24,185.81,187.21,179.24,185.93,45961300,185.93
-2007-10-23,188.56,188.60,182.76,186.16,64005900,186.16
-2007-10-22,170.35,174.90,169.96,174.36,56203900,174.36
-2007-10-19,174.24,174.63,170.00,170.42,46063800,170.42
+2007-10-25,184.87,185.90,181.66,182.78,34771500,182.78
+2007-10-24,185.81,187.21,179.24,185.93,46017200,185.93
+2007-10-23,188.56,188.60,182.76,186.16,64113000,186.16
+2007-10-22,170.35,174.90,169.96,174.36,58910700,174.36
+2007-10-19,174.24,174.63,170.00,170.42,46135000,170.42
2007-10-18,171.50,174.19,171.05,173.50,29417000,173.50
-2007-10-17,172.69,173.04,169.18,172.75,39969400,172.75
-2007-10-16,165.54,170.18,165.15,169.58,38093400,169.58
-2007-10-15,167.98,169.57,163.50,166.98,38448900,166.98
-2007-10-12,163.01,167.28,161.80,167.25,35244200,167.25
-2007-10-11,169.49,171.88,153.21,162.23,58671500,162.23
-2007-10-10,167.55,167.88,165.60,166.79,23779600,166.79
+2007-10-17,172.69,173.04,169.18,172.75,40271900,172.75
+2007-10-16,165.54,170.18,165.15,169.58,38136800,169.58
+2007-10-15,167.98,169.57,163.50,166.98,38497500,166.98
+2007-10-12,163.01,167.28,161.80,167.25,35292000,167.25
+2007-10-11,169.49,171.88,153.21,162.23,58714000,162.23
+2007-10-10,167.55,167.88,165.60,166.79,23842500,166.79
2007-10-09,170.20,171.11,166.68,167.86,39438800,167.86
-2007-10-08,163.49,167.91,162.97,167.91,29815900,167.91
-2007-10-05,158.37,161.58,157.70,161.45,33595200,161.45
-2007-10-04,158.00,158.08,153.50,156.24,23402900,156.24
-2007-10-03,157.78,159.18,157.01,157.92,24696400,157.92
-2007-10-02,156.55,158.59,155.89,158.45,28250600,158.45
-2007-10-01,154.63,157.41,152.93,156.34,29861300,156.34
-2007-09-28,153.44,154.60,152.75,153.47,21915800,153.47
-2007-09-27,153.77,154.52,152.32,154.50,23427700,154.50
-2007-09-26,154.47,155.00,151.25,152.77,34801900,152.77
-2007-09-25,146.84,153.22,146.82,153.18,42572900,153.18
-2007-09-24,146.73,149.85,146.65,148.28,37506200,148.28
-2007-09-21,141.14,144.65,140.31,144.15,40651300,144.15
-2007-09-20,140.15,141.79,139.32,140.31,24575400,140.31
-2007-09-19,143.02,143.16,139.40,140.77,36633200,140.77
-2007-09-18,139.06,142.85,137.83,140.92,37951300,140.92
-2007-09-17,138.99,140.59,137.60,138.41,28301900,138.41
-2007-09-14,136.57,138.98,136.20,138.81,21674400,138.81
+2007-10-08,163.49,167.91,162.97,167.91,29854600,167.91
+2007-10-05,158.37,161.58,157.70,161.45,33695400,161.45
+2007-10-04,158.00,158.08,153.50,156.24,23462800,156.24
+2007-10-03,157.78,159.18,157.01,157.92,24732800,157.92
+2007-10-02,156.55,158.59,155.89,158.45,28288200,158.45
+2007-10-01,154.63,157.41,152.93,156.34,29895300,156.34
+2007-09-28,153.44,154.60,152.75,153.47,21967900,153.47
+2007-09-27,153.77,154.52,152.32,154.50,23507100,154.50
+2007-09-26,154.47,155.00,151.25,152.77,34831000,152.77
+2007-09-25,146.84,153.22,146.82,153.18,42591100,153.18
+2007-09-24,146.73,149.85,146.65,148.28,37577200,148.28
+2007-09-21,141.14,144.65,140.31,144.15,40674300,144.15
+2007-09-20,140.15,141.79,139.32,140.31,24708600,140.31
+2007-09-19,143.02,143.16,139.40,140.77,36674300,140.77
+2007-09-18,139.06,142.85,137.83,140.92,38003200,140.92
+2007-09-17,138.99,140.59,137.60,138.41,28334700,138.41
+2007-09-14,136.57,138.98,136.20,138.81,21690000,138.81
2007-09-13,138.83,139.00,136.65,137.20,23434400,137.20
2007-09-12,135.99,139.40,135.75,136.85,36527500,136.85
2007-09-11,137.90,138.30,133.75,135.49,34710200,135.49
@@ -3132,3 +3299,2784 @@
1995-09-11,44.88,45.50,44.25,44.25,6160800,11.03
1995-09-08,44.75,44.88,44.50,44.75,6243200,11.15
1995-09-07,44.00,45.31,43.75,44.75,9373600,11.15
+1995-09-06,43.88,44.17,43.50,43.75,7175600,10.90
+1995-09-05,43.50,43.50,42.75,43.50,6443200,10.84
+1995-09-01,43.00,43.50,42.88,42.94,3532400,10.70
+1995-08-31,43.38,43.50,43.00,43.00,3148000,10.72
+1995-08-30,43.25,43.75,43.13,43.38,5482000,10.81
+1995-08-29,43.00,43.25,42.50,43.13,11325600,10.75
+1995-08-28,44.88,45.00,43.00,43.00,8680000,10.72
+1995-08-25,45.88,45.88,44.63,44.75,4819200,11.15
+1995-08-24,45.63,46.25,45.50,45.75,10285200,11.40
+1995-08-23,44.88,45.88,44.63,45.50,9078000,11.34
+1995-08-22,44.38,45.13,44.13,44.75,7769200,11.15
+1995-08-21,44.88,45.38,44.13,44.13,9721200,11.00
+1995-08-18,44.88,45.13,43.75,44.88,8620000,11.19
+1995-08-17,44.63,45.50,44.13,44.63,8827600,11.12
+1995-08-16,44.00,44.50,43.63,44.50,10457600,11.09
+1995-08-15,43.88,44.13,43.13,44.06,11370800,10.95
+1995-08-14,43.00,43.75,42.88,43.38,5989200,10.78
+1995-08-11,42.88,43.13,41.88,43.06,7407600,10.70
+1995-08-10,43.13,43.25,42.63,42.75,5868000,10.63
+1995-08-09,42.63,43.75,42.50,43.13,13190000,10.72
+1995-08-08,43.63,43.75,42.38,42.50,8388800,10.56
+1995-08-07,44.13,44.63,43.13,43.38,6920000,10.78
+1995-08-04,45.00,45.13,43.75,44.25,6884400,11.00
+1995-08-03,44.13,45.63,43.88,45.00,7640800,11.18
+1995-08-02,43.88,45.00,43.75,44.38,9840800,11.03
+1995-08-01,44.88,44.88,43.50,43.50,7540000,10.81
+1995-07-31,45.50,45.63,44.75,45.00,5673600,11.18
+1995-07-28,46.75,47.25,45.00,45.50,9341200,11.31
+1995-07-27,45.50,47.50,45.50,46.81,11621200,11.63
+1995-07-26,46.25,46.25,45.38,45.38,6125200,11.28
+1995-07-25,46.00,46.38,45.63,45.75,9418000,11.37
+1995-07-24,44.00,45.50,43.75,45.38,7679200,11.28
+1995-07-21,43.00,44.88,43.00,43.75,27082400,10.87
+1995-07-20,46.00,47.38,45.00,47.06,11848800,11.70
+1995-07-19,47.00,48.00,45.00,45.50,18613200,11.31
+1995-07-18,49.00,49.56,47.75,48.13,9102000,11.96
+1995-07-17,48.88,49.75,48.63,49.00,8098000,12.18
+1995-07-14,47.38,49.00,47.00,48.75,9929200,12.12
+1995-07-13,47.38,48.75,47.13,47.63,12596400,11.84
+1995-07-12,47.25,48.00,46.13,47.00,10145200,11.68
+1995-07-11,47.75,48.63,47.06,47.13,7683200,11.71
+1995-07-10,48.63,49.88,48.13,48.63,10640800,12.09
+1995-07-07,46.88,49.25,46.75,48.63,13840000,12.09
+1995-07-06,46.50,47.00,45.75,47.00,6583200,11.68
+1995-07-05,46.88,47.88,46.50,46.50,6325600,11.56
+1995-07-03,46.50,47.13,46.25,46.94,1410800,11.67
+1995-06-30,47.25,47.88,46.13,46.44,5927600,11.54
+1995-06-29,46.38,48.13,46.00,47.25,8320000,11.74
+1995-06-28,46.00,47.50,45.38,46.63,9531200,11.59
+1995-06-27,47.38,48.25,46.38,46.38,7772400,11.53
+1995-06-26,48.25,48.50,47.63,48.13,5465600,11.96
+1995-06-23,48.75,49.00,47.75,48.75,8286800,12.12
+1995-06-22,49.00,49.63,48.63,49.13,16928800,12.21
+1995-06-21,47.63,50.13,46.75,49.38,22378800,12.27
+1995-06-20,46.00,47.75,46.00,47.38,26385200,11.78
+1995-06-19,43.88,45.25,43.50,44.38,16774400,11.03
+1995-06-16,43.88,44.00,43.50,43.88,3200800,10.91
+1995-06-15,43.63,43.75,43.38,43.63,3331200,10.84
+1995-06-14,43.88,43.88,43.38,43.63,4224800,10.84
+1995-06-13,44.50,44.63,43.88,44.00,4508000,10.94
+1995-06-12,44.00,44.50,43.88,44.17,7584400,10.98
+1995-06-09,43.63,43.75,43.13,43.50,6679200,10.81
+1995-06-08,43.38,43.38,42.13,42.94,4874400,10.67
+1995-06-07,44.13,44.13,43.13,43.13,4451200,10.72
+1995-06-06,43.63,44.38,43.50,44.00,11270800,10.94
+1995-06-05,42.38,43.50,42.13,43.50,9103200,10.81
+1995-06-02,41.88,42.38,41.50,42.13,3783200,10.47
+1995-06-01,41.88,42.50,41.75,42.19,6685200,10.49
+1995-05-31,42.13,42.13,41.00,41.56,5707600,10.33
+1995-05-30,42.63,42.88,41.50,42.00,7021200,10.44
+1995-05-26,43.00,43.13,42.25,42.69,4097600,10.61
+1995-05-25,43.25,44.00,43.00,43.38,6536800,10.75
+1995-05-24,43.75,44.25,42.88,43.50,9459200,10.78
+1995-05-23,44.13,44.38,43.50,43.88,9881200,10.88
+1995-05-22,42.50,44.13,42.25,44.13,13282400,10.94
+1995-05-19,42.88,43.75,42.63,42.75,11522000,10.60
+1995-05-18,44.13,44.13,43.25,43.38,13287600,10.75
+1995-05-17,43.75,44.38,43.50,44.00,9419200,10.91
+1995-05-16,43.13,44.38,42.50,43.75,11895600,10.84
+1995-05-15,43.13,43.75,42.50,43.63,14053200,10.81
+1995-05-12,40.88,43.69,40.50,43.63,23153200,10.81
+1995-05-11,41.63,41.63,40.38,41.00,18712400,10.16
+1995-05-10,41.50,41.88,40.75,41.44,9837600,10.27
+1995-05-09,40.63,41.38,40.00,41.25,11540800,10.22
+1995-05-08,39.88,41.00,39.75,40.50,13832000,10.04
+1995-05-05,38.75,39.13,38.13,38.88,7445200,9.64
+1995-05-04,38.25,39.88,38.00,38.50,10846800,9.54
+1995-05-03,38.25,38.63,38.00,38.13,6043600,9.45
+1995-05-02,38.25,38.38,37.50,38.13,4289200,9.45
+1995-05-01,38.25,38.75,38.00,38.25,6375600,9.48
+1995-04-28,38.00,38.38,37.50,38.25,6984400,9.48
+1995-04-27,38.50,38.50,37.75,37.88,5014800,9.39
+1995-04-26,37.63,38.75,37.38,38.25,8246800,9.48
+1995-04-25,39.13,39.38,37.25,37.75,9780000,9.36
+1995-04-24,39.00,39.63,38.50,39.00,9724400,9.67
+1995-04-21,37.25,39.50,37.13,39.13,23812400,9.70
+1995-04-20,37.13,38.50,36.63,37.63,11772400,9.33
+1995-04-19,37.50,37.50,35.63,36.38,9990800,9.02
+1995-04-18,38.50,38.63,37.50,37.50,8263200,9.29
+1995-04-17,38.13,39.38,37.88,38.38,7467600,9.51
+1995-04-13,39.25,39.25,37.88,38.25,6242400,9.48
+1995-04-12,38.25,39.63,37.38,39.00,16973200,9.67
+1995-04-11,36.75,37.88,36.63,37.75,7673200,9.36
+1995-04-10,36.88,37.00,36.13,36.63,4211200,9.08
+1995-04-07,37.00,37.13,36.25,36.75,10562400,9.11
+1995-04-06,37.25,38.00,35.53,36.75,25823600,9.11
+1995-04-05,34.13,34.75,33.75,34.75,9470000,8.61
+1995-04-04,35.75,35.88,33.63,33.88,15300000,8.40
+1995-04-03,35.50,35.75,35.13,35.50,5528000,8.80
+1995-03-31,35.13,35.63,34.75,35.25,6558000,8.74
+1995-03-30,34.63,35.50,34.50,35.38,9767600,8.77
+1995-03-29,34.00,34.88,33.88,34.38,17760000,8.52
+1995-03-28,36.25,36.34,34.13,34.38,24655600,8.52
+1995-03-27,37.63,37.63,36.63,37.19,5111200,9.22
+1995-03-24,37.38,37.88,37.25,37.75,4584400,9.36
+1995-03-23,37.88,38.00,36.98,37.13,6094400,9.20
+1995-03-22,36.25,39.50,36.25,38.06,17130800,9.43
+1995-03-21,35.50,36.75,35.25,36.25,10920800,8.98
+1995-03-20,35.13,35.63,35.00,35.25,6793600,8.74
+1995-03-17,35.50,35.50,34.88,35.13,7713600,8.71
+1995-03-16,35.25,36.00,35.00,35.25,11330000,8.74
+1995-03-15,35.50,36.25,34.88,35.00,26120800,8.67
+1995-03-14,38.25,38.25,34.50,35.00,26015200,8.67
+1995-03-13,39.63,39.63,38.00,38.13,11653200,9.45
+1995-03-10,39.63,40.38,39.38,39.50,4923200,9.79
+1995-03-09,39.88,40.38,39.38,39.75,7038000,9.85
+1995-03-08,38.75,40.13,37.75,39.56,13048800,9.81
+1995-03-07,39.88,39.88,38.25,38.31,5399200,9.50
+1995-03-06,39.75,40.00,39.50,39.75,4751200,9.85
+1995-03-03,39.75,40.69,39.50,40.25,5209200,9.98
+1995-03-02,40.13,40.75,39.75,40.00,9619200,9.91
+1995-03-01,39.75,40.13,39.42,40.00,8025200,9.91
+1995-02-28,38.50,39.88,38.00,39.50,7965200,9.79
+1995-02-27,38.25,39.00,38.11,38.25,9600800,9.48
+1995-02-24,40.13,40.38,38.50,39.00,20334400,9.67
+1995-02-23,41.13,41.88,40.00,40.19,11262000,9.96
+1995-02-22,40.63,41.00,40.13,40.81,10501200,10.12
+1995-02-21,42.63,42.75,40.88,41.00,10776800,10.16
+1995-02-17,42.88,43.00,42.50,42.50,4366400,10.53
+1995-02-16,43.13,43.25,42.63,43.19,7821200,10.70
+1995-02-15,43.25,43.50,42.50,42.56,6604400,10.55
+1995-02-14,43.75,44.13,42.63,42.94,5934400,10.64
+1995-02-13,43.50,44.50,43.25,43.75,10120800,10.84
+1995-02-10,43.63,44.19,43.3...
[truncated message content] |
|
From: <jd...@us...> - 2008-10-15 15:42:30
|
Revision: 6203
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6203&view=rev
Author: jdh2358
Date: 2008-10-15 15:39:44 +0000 (Wed, 15 Oct 2008)
Log Message:
-----------
more screenshot updates
Modified Paths:
--------------
trunk/matplotlib/doc/_templates/index.html
trunk/matplotlib/doc/devel/documenting_mpl.rst
trunk/matplotlib/doc/pyplots/plotmap.hires.png
trunk/matplotlib/doc/pyplots/plotmap.pdf
trunk/matplotlib/doc/pyplots/plotmap.png
trunk/matplotlib/doc/pyplots/plotmap.py
trunk/matplotlib/doc/users/screenshots.rst
trunk/matplotlib/examples/api/date_demo.py
trunk/matplotlib/examples/pylab_examples/finance_work2.py
trunk/matplotlib/examples/pylab_examples/log_demo.py
trunk/matplotlib/examples/pylab_examples/scatter_demo2.py
trunk/matplotlib/lib/matplotlib/__init__.py
trunk/matplotlib/setup.py
Added Paths:
-----------
trunk/matplotlib/doc/_static/eeg_large.png
trunk/matplotlib/doc/_static/eeg_small.png
trunk/matplotlib/examples/pylab_examples/usetex_demo.py
trunk/matplotlib/lib/matplotlib/mpl-data/example/
trunk/matplotlib/lib/matplotlib/mpl-data/example/aapl.npy
trunk/matplotlib/lib/matplotlib/mpl-data/example/goog.npy
trunk/matplotlib/lib/matplotlib/mpl-data/example/msft_nasdaq.npy
Added: trunk/matplotlib/doc/_static/eeg_large.png
===================================================================
(Binary files differ)
Property changes on: trunk/matplotlib/doc/_static/eeg_large.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/matplotlib/doc/_static/eeg_small.png
===================================================================
(Binary files differ)
Property changes on: trunk/matplotlib/doc/_static/eeg_small.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/matplotlib/doc/_templates/index.html
===================================================================
--- trunk/matplotlib/doc/_templates/index.html 2008-10-15 12:43:41 UTC (rev 6202)
+++ trunk/matplotlib/doc/_templates/index.html 2008-10-15 15:39:44 UTC (rev 6203)
@@ -22,12 +22,10 @@
For the power user, you have full control of line styles, font
properties, axes properties, etc, via an object oriented interface
- or via a handle graphics interface familiar to matlab users. A
- summary of the goals of matplotlib and the progress so far can be
- found <a href=goals.html>here</a>.<p>
+ or via a handle graphics interface familiar to matlab users.
- The plotting functions in the <a href=api/pyplot_api.html>pyplot
- interface</a> have a high degree of Matlab® compatibility.<p>
+ The plotting functions in the <a href=api/pyplot_api.html>pyplot</a>
+ interface have a high degree of Matlab® compatibility.<p>
<br>
<table border=1 cellpadding=3 cellspacing=2>
Modified: trunk/matplotlib/doc/devel/documenting_mpl.rst
===================================================================
--- trunk/matplotlib/doc/devel/documenting_mpl.rst 2008-10-15 12:43:41 UTC (rev 6202)
+++ trunk/matplotlib/doc/devel/documenting_mpl.rst 2008-10-15 15:39:44 UTC (rev 6203)
@@ -229,6 +229,26 @@
in mpl and let it handle the scaling. ``:include-source:`` will
present the contents of the file, marked up as source code.
+You can also point to local files with relative path. Use the
+sym-link for mpl_examples in case we do a reorganization of the doc
+directory at some point, eg::
+
+ .. plot:: ../mpl_examples/pylab_examples/simple_plot.py
+
+If the example file needs to access data, it is easy to get screwed up
+with relative paths since the python example may be run from a diffent
+location in the plot directive build framework. To work around this,
+you can add your example data to mpl-data/example and refer to it in
+the example file like so::
+
+ import matplotlib
+ # datafile is a file object
+ datafile = matplotlib.get_example_data('goog.npy')
+ r = np.load(datafile).view(np.recarray)
+
+Try to keep the example datafiles relatively few and relatively small
+to control the size of the binaries we ship.
+
Static figures
--------------
Modified: trunk/matplotlib/doc/pyplots/plotmap.hires.png
===================================================================
(Binary files differ)
Modified: trunk/matplotlib/doc/pyplots/plotmap.pdf
===================================================================
--- trunk/matplotlib/doc/pyplots/plotmap.pdf 2008-10-15 12:43:41 UTC (rev 6202)
+++ trunk/matplotlib/doc/pyplots/plotmap.pdf 2008-10-15 15:39:44 UTC (rev 6203)
@@ -4,7 +4,7 @@
<< /Type /Catalog /Pages 3 0 R >>
endobj
2 0 obj
-<< /CreationDate (D:20081015040257-07'00')
+<< /CreationDate (D:20081015060838-07'00')
/Producer (matplotlib pdf backend)
/Creator (matplotlib 0.98.3, http://matplotlib.sf.net) >>
endobj
@@ -13,7 +13,7 @@
endobj
4 0 obj
<< /Contents 5 0 R /Type /Page /Resources 10 0 R /Parent 3 0 R
-/MediaBox [ 0 0 576 576 ] >>
+/MediaBox [ 0 0 432 432 ] >>
endobj
10 0 obj
<< /Pattern 8 0 R /XObject 9 0 R /Font 6 0 R /ExtGState 7 0 R
@@ -22,12315 +22,12403 @@
5 0 obj
<< /Filter /FlateDecode /Length 11 0 R >>
stream
-x\x9C\x9C\xBDK\xD2m\xD9r\x95Y߭\xF8[\xF03ߏ*\x865\x8C
-\xC02\xB3"\x81A\x85\xEE3\xBE\xE1>\xF7\xB9R8~|\xAF\xB5\xE6\xC3\xDF>\xBC\xFD\xFCǟ\xFA\xF3\xFF\xE9\xBF\xFF\xFES~\xCA\xCF?\xFF̽\xF4\xFF\xC9\xFF\x97\xFF\xFE\x93\xFE\xED\xFD_\xFD\xF9\xE7\xDF\xEA\xEF\xFD/\xFD\xFF\xFE3\xF7\xEF\xFA\xB9\xF7w\xAD\xB9FY\xA5\xB1\x8FU~Ͽ\xFA\xD3\xCA?\xF5\xFC\xEE>\xFA\xBC\xFD\xDE\xE5g\xFC\xAE\xCF\xDF\xFE\xE9\xBF\xFE\x85\xCF\xFF\xFB\xF9G\xA5\xFF\xB6\x9F^\xEFoYg׳\xEF\xED?\xFF\xF3\xFF\xF9\xF9/?\xFFM\xEFȷ\xFD/1\xFDM7}\xCB\xF9\xA9\xA5\xFC\xFC\xD7\xFE\xF97\xFF\xA1\xFE\xFC\xBB\xFF\xFE\xF3\x9F>\xFF\xE9\xE7\xFF\xEFo{\xEA\xD4\xDF+}\xB7\xB3\xF5\x9F\xF8\xCAVw\xDF뜥%\xA9\xB3\xFD\xDE=V;\xFA\xC7\xE4\xDAZ[\x87_\xC1^\xCF-\xABk\xAA\xE8\xFB\xB7\xEF1\xCF8\xB3\xB1vu\xD6\xDFQ\xEF\xD0#\xCEf\xF4\xBB\x{126DDA}\xBF\xFD\xAE2z\xD7\xFB\xFA\xF7\xD7\xEF>k\xEAO\xDA
-\xFE\xFE[f\xDDsU\xFD\x8A\xE9\xE3\x9C~\xE7\xACc$\xEF\xFAL\xFD\x95\xBEM\xAF\xB3\xCCsg\xF6\xF1[k\xE7\x91{\xF0\xF8\xF9\xAB\xF7X瞦\x85}\xFC\x9E2ʞg\xF1\xF4\xFE;ǘ\xAD\xB6ڗ\xD9\xF5\xF7W\x99S\xEFW\xA7\xE9\xE5\xB6vƮ\xA3&\xFB]Z\xBDy\xD7\xE9\xA27=m
-\xADe\xE95\xF9W\xD3ה\xF4\xF2\xCBJԪw\xEC柿g\x94\xD2[_Mo_\xB4\xF8W\x8F.\xE3\xF4f\xFE\xFD\xAB\x93UwٵO\xD3\xF52K\xAFP\xFA5\xFF\xFE\x89_<C\xBF_\xD6\xEF=s5}\xED=\xF9\xFCS\xB5wz\xAB+\xBAV\xB9\xE8\x81\xE2\xC8\xE7\xDFq\xDBlm\xD6\xC3I\xFB\xDD\xF5\x9ER\xB4\xB9z\xB7k\xBD\xDBЧ\xF9H\x9D£K\xDD7\xD9\xF52{\xFD*GNG\xA5V}\x8F^p\xE4㧎\xC6ik\x9Fi\xFA\\xB3^\xB4\xBB\x93k\x9F\xCBXw]ӏnQ/\xFA\x80\xF8\xFC\xF5\xDBZ?}\x9Dv\xBB\xE9\xEB\x8Cq\xFB\xE4\xE7r\xF9\xEEe\xC5{>\xBF/\xBD\xFFs>\xF61t0X\xCF`_Kk\xB9\x97\xBEv-WmZ\xF1;9\xFA\xA2\x8F58Z\x8E\}\xADU9\xFA\xD7||mǻ\x99gO\xFC\xAB\xF5\xDAʝ-\xF8\xDB҉/\xBAA\xE6?z`\xAB\x92[\xC7\xC9˷t\x83*\xF7\xC9\xFCG\xECzA=\xBEy\xF5u)f_W\x95\xFCWgW\xE8s\x99\xAE\xF7\xBFu\x9Cu\xE3\xFD\xAF\xB6S\xBF\xB6Σ靗\xABM\xE7~\xC9-mg9\xE2\xEE\xBC\xFF\xFC-z}\xDD\xEEǯ\xAA߫m\xAC\xC9\xFB\x8ERo\xD1>s\xC0\xBC{\xA26[\x87\xB0<\x92\x82\xDA]\x84\xBB{\xF27\xBDnё\x9F=\xE8wkOj?\xC9>\x9B\xF6\xEE\xF6s\xAEɺds\xFD\xFBMv\x9D\xA6vu[\xEE\xF6\xE3\x8B~\xB8\x8E\x9F\xF9ۯ~\xFA\\x9D\x98\xFC\xDA\xEA}{\xD9e&\xFF\xD6rhkˊ\xD7㢜;\xE2\xE6\x8B]\xB5\xEB\xF8\xCF|\xBBz$\xB6\xB6\xCEo\xB0k\xB7\xCA:\xAF]wQ\xD2\xFBW\x8C\x85\xD5\xE8\xDE\xFC%\xC1vu+Ĥ\xD7\xEB\xF7\xFC\xEA\x8Eܡ՞;\xF9\x8F\xEE\xAE>\xB0\x99\xAAEԧH\xD0\xD6|\xBA\x83Vz\xEB\xA2A\x96\x90ں\xF4\xAB\xDD\xFCq\xBD{\xD3\xE6\xEDS?\xFDnI\xB5+\xF6"\xB1\x98\xF4\xA9e\x9AW\xAFįs\xDEtϺ\xB64~^bm\xB3\xF1\x88:\xF1K.IN\xC6y\xF4>X\xABv\xA7\xF8\xB5\xA3I4ܹy\x96\x86\x8C\xF3yq0Ξ\xE3}\xFB\x99\;\xBD\xBE\xB99\xA3\xFA\xEB{<\xEER\xCB\xD2\xFF\x9A\xC1]\xAC0$\xC4\xB7\xDET\xFFrZge%\xF48\x84\xFA\xEFُ\xAD\xBA;\x8D\x97]\x8B\xAC\x9Fh\x8FZ\xF6-e\xEAj
-\xA4$`\xA6.\xCA{u\xAE\xE4\xF7Π\xEBp\xA2\xF5\x93\x9F`\xD7)ns\x9Ddѵ1:\xF0\xBA \x92\xF9\xF3\xBA\x83\xFA9km둀\xD5_\x90\x94\xD1jy[\xF5\xE9C7@\xF2vo\xF3\xF7~ur\xF4}5\xF9%1\xA4=t\xE5\x9B\xF9\xB74\xA3\xDE\xC7\xDF\xFC\xE8\x9B%A\xA0c\xBD\xE8etۗ_
-FGMb~\xED\xEC֦mI\xA9\xFB\xF8o\xE3`J\x8D\x99.Uڥ\xA3\xB8y2Xw\xBD\xD5Z\xA6\xB7&\x81\xB2Ϊ;\xF9\xF5m:Ke\x99.\xFD\xD66"cͷ9: \xD2I:\x9A\xF1\xFBz\xF16tҾ\xEF_XKm\xF00\xBB\xC43\xCAr\xCE\xF3\xD8u,\xB8r3\xE9}\xEA\xED\xA5\xDF\xE3u0\x8F\xCC IVѵ\x92\xCDR潞\xBCR\x8E\xFA\xF6\xAA%\xBA\xEF\xEAo\xAF\xF5^\xBF\xEAN\xCC\x9F\xDF\xE02^\xB4\xDD\xDF\xD7\xD7
-]\xD2\xD3\xF1\xFB\xFA\xFF$\xF5\xB43\xF9\xD18:N\x8D{y\xAA^\xA7k\xF3\xF6\x9D\xEB=\xBFaKl鐟\xBE/Bi \xA2\xBDS\xA8\\xA9iY\x83\xED]\xDF.\xA47\xD9)R/?\xA0+)\x99\xD97
-YK!\xA5p\xE3\xFD%\xE5\x96v\xB7n\x9D\xD3;\xA7K\xFA\xF0\xAE\xE4G*\xE9=u[E\xDF2\xAE$\xB1\xCB\xD9aP\xC0/&A2r\xD3/K;h˭\xAET\xB6\xCF}\xC9^Aݵ\xB9N\xB2/,\xB9\x82\xCA4]\xEF&\xC3Hr\xE9=^\xA7\xA9\x95\xA9\xAC\xA6K-\xC0P("cNT\x87\xC5\xDBMD\xAEԗl\xB3\xF3\xCFf\xC9\xEDj\xBA\x8EE[\xA8\xCF'\x92\x8B$\x9C\xCE:\xCB\xC9\xCF\xCB\xEC\x90\xF2*ߵC\xD3i\x81g|\x9CD\xB1\xEC \xAD\xD5WI\xC0ol\xC3xyifta\xE9O!\xE8\xCE\xE9m\xE79f\x97)\x836\xBFO\x9E\xEBKw\xE8\xAF7\xAF\xBC\xC9\xD0/\xF4\xB6\xF2\xE4t\xC90\xDD#\x9D&\xB3뫵6Z\xFDx\xBAn\x8A\x94\xBF\xE4\xDC\xE5bo\x99B\x92\xF4W\xA6I(c\xD1%tt7\xEA\xBA>K'\xC7\xF7\xD2\xEC\xDA\xAD\xAC\xD6NTT}\xB3\xAE\xECO`\xEB\xB0\xB4Q\xE82\xC2\xF4k[\x879ٻ\x84\x92.=\xA6\x82Į\xF4\x95X\x90L\xEDO\xE6J\xEBe\xEA\xE0\xE9hv}.\xA6JK~\x9D\x93\xC9\xD58\xDDt\xD9<\xB2\xDAnOjv>\xBDxi\x97\xA4\xAAT\xD1\xF2)I\xA1'˭UI\xEC\xF8um\x866\xA6q\x88c\xED\x8AT_\xC78\xBC\xA6co]\xE39r\xEDWY2\x9E\xF4\xEB\xD3t\xA4\x93\xDEm\xA4\xBE\x91\xAA\x97 "\xD3T\xAF\x9F\x8F\xFAm\xD9:5w~H\xC8\xC9T\xD2ُ\xAF\x93!"\xF9\x84\xA6L \x99*\xFA\xB6\xEB[\xAB\xBF.A\xE1\xCEwku\xA8\xF7A\xF3\xEB\x9C \xF1zjc\x8E\xBD>PT\xA4\x8E\x9E\xAF\xF3\xAD\xE3\xA1c\xFDνLd}\xD2\xC4\xCE\xF4\xF7Ih\xEB\xCEI\x93乗!K\xB5Y\xAA\xE9\xF9=\xD4[==\xF9\xA5%G'\xC6\xFC\xF2xz\x91F\x9D\xF5\xF1\xA3b\xC7\xFC#vc\xFB\xBC{\xB7dZ@\xD6W
-W.\x91\x87\x9E\x9A\xFCCϒ1\xA0#\xE2ӣ-\xD1\xEBtX\x82Z
-\xED\xCF\xF0\xF2H\xDBK\x80\xEA;6vb+\x92\xE8\xE0X\xBE\x8E\x88\xAD\xFC\xF5`\x91\x921_\x87\xFA\xD1\xDFX'\xCDPm\x97\xA4\9+VW\x8A\/#[\xE9\xA4\x8BƓE\xC1{\xF5%\xBC%\xD6i\x86K\xC8\xE8v,\xCCX\xAFΔH\x97~lόk\xFB\xEF\xC8\xFAX\xD2\xE1ɿ1\xCD\xF4\x93\xA5\xC6隨\xAD\xC0zN\xCC\xE5ާL\xC6ސ\xFC։;\xFD\xB9\xDAh\xDDLI\x9A8ݺ\xB5r1k\xBE\xBFt\xB0NZY^N\xD3u\xBCu~S\xE7\xC0/\xFDpe^\xE5\xE9\xD2\xCEV|\xD2\xFE\xDE_I\xCB'\xD9q|\xBA\xBAn\x9E\xBEW_\xF9\xBE_\xBB_\x86^_\xBF\xBF\xE4\xE8\xD3\xEFn\xED91KF\x94TV\x9Fq7+*CV\xFB\x99χ\xDB:L
-\xA3\xEA\xDD]\xA9\xAE\xD3\xE3\xD7osz\xE2\xE9\xDAw\xC9_XkR\xE3\xE7\xB7 |
|
From: <jd...@us...> - 2008-10-15 15:52:13
|
Revision: 6204
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6204&view=rev
Author: jdh2358
Date: 2008-10-15 15:49:26 +0000 (Wed, 15 Oct 2008)
Log Message:
-----------
updates to the sidebar, misc fixes
Modified Paths:
--------------
trunk/matplotlib/doc/_templates/indexsidebar.html
trunk/matplotlib/doc/_templates/layout.html
trunk/matplotlib/doc/faq/installing_faq.rst
trunk/matplotlib/doc/users/screenshots.rst
trunk/matplotlib/doc/users/toolkits.rst
trunk/matplotlib/examples/misc/longshort.py
trunk/matplotlib/examples/pylab_examples/mathtext_examples.py
Modified: trunk/matplotlib/doc/_templates/indexsidebar.html
===================================================================
--- trunk/matplotlib/doc/_templates/indexsidebar.html 2008-10-15 15:39:44 UTC (rev 6203)
+++ trunk/matplotlib/doc/_templates/indexsidebar.html 2008-10-15 15:49:26 UTC (rev 6204)
@@ -1,21 +1,24 @@
<h3>Download</h3>
<p>Current version: <b>{{ version }}</b></p>
-<p>Get matplotlib from the sourceforge <a
-href="http://sourceforge.net/projects/matplotlib">download</a> page
+<p>Download matplotlib from the sourceforge <a
+href="http://sourceforge.net/projects/matplotlib">project</a> page.
+There are also optional <a href="{{ pathto('users/toolkits') }}">toolkits</a> for matplotlib.
+
<h3>Need help?</h3>
-<p>Join the matplotlib <a
-href="http://sourceforge.net/project/showfiles.php?group_id=80706">mailing lists</a>
+<p>Check the <a href="{{ pathto('contents') }}"}>docs</a>, the <a
+href="{{ pathto('faq/index') }}">faq</a>, and join the matplotlib mailing <a
+href="http://sourceforge.net/project/showfiles.php?group_id=80706">lists</a>
-<p>You can file bugs and patches on the sourceforge <a href="http://sourceforge.net/tracker/?group_id=80706">tracker</a>, but it is a good idea to ping us on the mailing list too.</p>
+<p>You can file bugs, patches and feature requests on the sourceforge <a href="http://sourceforge.net/tracker2/?group_id=80706">tracker</a>, but it is a good idea to ping us on the mailing list too.</p>
<h3>Screenshots</h3>
<a href="{{ pathto('users/screenshots') }}"><img align=center src="{{
-pathto("_static/logo_sidebar.png", 1) }}"></a>
+pathto('_static/logo_sidebar.png', 1) }}"></a>
<a href="{{ pathto('users/screenshots') }}">screenshots</a> and <a href=examples>examples</a>
+
-
Modified: trunk/matplotlib/doc/_templates/layout.html
===================================================================
--- trunk/matplotlib/doc/_templates/layout.html 2008-10-15 15:39:44 UTC (rev 6203)
+++ trunk/matplotlib/doc/_templates/layout.html 2008-10-15 15:49:26 UTC (rev 6204)
@@ -17,3 +17,4 @@
{% block sidebar2 %}{% endblock %}
+
\ No newline at end of file
Modified: trunk/matplotlib/doc/faq/installing_faq.rst
===================================================================
--- trunk/matplotlib/doc/faq/installing_faq.rst 2008-10-15 15:39:44 UTC (rev 6203)
+++ trunk/matplotlib/doc/faq/installing_faq.rst 2008-10-15 15:49:26 UTC (rev 6204)
@@ -90,6 +90,20 @@
<locating-matplotlib-install>`
+.. _install_svn:
+
+How to install from svn
+=======================
+
+Checking out the main source::
+
+ svn co https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk matplotlib
+
+and build and install as usual with::
+
+ > cd matplotlib
+ > python setup.py install
+
Backends
========
Modified: trunk/matplotlib/doc/users/screenshots.rst
===================================================================
--- trunk/matplotlib/doc/users/screenshots.rst 2008-10-15 15:39:44 UTC (rev 6203)
+++ trunk/matplotlib/doc/users/screenshots.rst 2008-10-15 15:49:26 UTC (rev 6204)
@@ -158,13 +158,14 @@
================
You can make much more sophisticated financial plots. This example
-emulates one of the `ChartDirector <http://www.advsofteng.com/gallery_finance.html>`
-financial plots. Some of the data in the plot, are real financial
-data, some are random traces that I used since the goal was to
-illustrate plotting techniques, not market analysis!
+emulates one of the `ChartDirector
+<http://www.advsofteng.com/gallery_finance.html>` financial plots.
+Some of the data in the plot, are real financial data, some are random
+traces that I used since the goal was to illustrate plotting
+techniques, not market analysis!
-plot:: ../mpl_examples/pylab_examples/finance_work2.py
+.. plot:: ../mpl_examples/pylab_examples/finance_work2.py
.. _screenshots_basemap_demo:
@@ -178,7 +179,7 @@
proj4 library: cylindrical equidistant, mercator, lambert conformal
conic, lambert azimuthal equal area, albers equal area conic and
stereographic. See the `tutorial
-<http://www.scipy.org/wikis/topical_software/Maps>` entry on the wiki.
+<http://www.scipy.org/wikis/topical_software/Maps>`_ entry on the wiki.
.. plot:: plotmap.py
@@ -197,7 +198,7 @@
-plot:: ../mpl_examples/pylab_examples/log_demo.py
+.. plot:: ../mpl_examples/pylab_examples/log_demo.py
.. _screenshots_polar_demo:
@@ -206,7 +207,7 @@
The :func:`~matplotlib.pyplot.polar` command generates polar plots.
-plot:: ../mpl_examples/pylab_examples/polar_demo.py
+.. plot:: ../mpl_examples/pylab_examples/polar_demo.py
.. _screenshots_legend_demo:
@@ -218,7 +219,7 @@
commands. Thanks to Charles Twardy for input on the legend
command
-plot:: ../mpl_examples/pylab_examples/legend_demo.py
+.. plot:: ../mpl_examples/pylab_examples/legend_demo.py
.. _screenshots_mathtext_examples_demo:
@@ -231,9 +232,9 @@
modern or STIX fonts. See the matplotlib.mathtext module for
additional. matplotlib mathtext is an independent implementation, and
does not required TeX or any external packages installed on your
-computer.
+computer.
-plot:: ../mpl_examples/pylab_examples/mathtext_examples.py
+.. plot:: ../mpl_examples/pylab_examples/mathtext_examples.py
.. _screenshots_tex_demo:
@@ -242,9 +243,9 @@
Although matplotlib's internal math rendering engine is quite
powerful, sometimes you need TeX, and matplotlib supports external TeX
-rendering of strings with the *usetex* option.
+rendering of strings with the *usetex* option.
-plot:: tex_demo.py
+.. plot:: tex_demo.py
.. _screenshots_eeg_demo:
Modified: trunk/matplotlib/doc/users/toolkits.rst
===================================================================
--- trunk/matplotlib/doc/users/toolkits.rst 2008-10-15 15:39:44 UTC (rev 6203)
+++ trunk/matplotlib/doc/users/toolkits.rst 2008-10-15 15:49:26 UTC (rev 6204)
@@ -12,20 +12,25 @@
=======
Plots data on map projections, with continental and political
-boundaries, `see <http://matplotlib.sf.net/basemap/doc/html>`
+boundaries, `see <http://matplotlib.sf.net/basemap/doc/html>`_
.. _toolkit_gtk:
GTK Tools
=========
-mpl_toolkits.gtktools provides some utilities for working with GTK. This toolkit ships with matplotlib, but requires `pygtk <http://www.pygtk.org/>`.
+mpl_toolkits.gtktools provides some utilities for working with GTK.
+This toolkit ships with matplotlib, but requires `pygtk
+<http://www.pygtk.org/>`_.
+
.. _toolkit_excel:
Excel Tools
===========
-mpl_toolkits.exceltools provides some utilities for working with Excel. This toolkit ships with matplotlib, but requires `pyExcelerator <http://sourceforge.net/projects/pyexcelerator>`
+mpl_toolkits.exceltools provides some utilities for working with
+Excel. This toolkit ships with matplotlib, but requires
+`pyExcelerator <http://sourceforge.net/projects/pyexcelerator>`_
.. _toolkit_natgrid:
@@ -35,6 +40,6 @@
mpl_toolkits.natgrid is an interface to natgrid C library for gridding
irregularly spaced data. This requires a separate installation of the
natgrid toolkit from the sourceforge `download
-<http://sourceforge.net/project/showfiles.php?group_id=80706&package_id=142792>`
+<http://sourceforge.net/project/showfiles.php?group_id=80706&package_id=142792>`_
page.
Modified: trunk/matplotlib/examples/misc/longshort.py
===================================================================
--- trunk/matplotlib/examples/misc/longshort.py 2008-10-15 15:39:44 UTC (rev 6203)
+++ trunk/matplotlib/examples/misc/longshort.py 2008-10-15 15:49:26 UTC (rev 6204)
@@ -41,7 +41,7 @@
fig = plt.figure()
ax = fig.add_subplot(111)
ax.plot(r.date, tr)
-ax.set_title('total return: long appl, short goog')
+ax.set_title('total return: long APPL, short GOOG')
ax.grid()
fig.autofmt_xdate()
plt.show()
Modified: trunk/matplotlib/examples/pylab_examples/mathtext_examples.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/mathtext_examples.py 2008-10-15 15:39:44 UTC (rev 6203)
+++ trunk/matplotlib/examples/pylab_examples/mathtext_examples.py 2008-10-15 15:49:26 UTC (rev 6204)
@@ -49,7 +49,7 @@
r'$\widehat{abc}\widetilde{def}$',
r'$\Gamma \Delta \Theta \Lambda \Xi \Pi \Sigma \Upsilon \Phi \Psi \Omega$',
r'$\alpha \beta \gamma \delta \epsilon \zeta \eta \theta \iota \lambda \mu \nu \xi \pi \kappa \rho \sigma \tau \upsilon \phi \chi \psi$',
- ur'Generic symbol: $\u23ce \mathrm{\ue0f2 \U0001D538}$'
+ #ur'Generic symbol: $\u23ce \mathrm{\ue0f2 \U0001D538}$'
]
from pylab import *
@@ -66,7 +66,7 @@
print (i, s)
text(0.1, -i, s, fontsize=20)
- savefig('mathtext_examples')
+ #savefig('mathtext_examples')
#close('all')
show()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2008-10-15 15:58:15
|
Revision: 6207
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6207&view=rev
Author: mdboom
Date: 2008-10-15 15:55:29 +0000 (Wed, 15 Oct 2008)
Log Message:
-----------
[ 2165316 ] importing pylab overwrites x
[ 2163348 ] error in mathtext_examples.py
[ 2156924 ] Typo: Missing parenthesis
[ 2135925 ] API example barchart_demo.py small error
Modified Paths:
--------------
trunk/matplotlib/examples/api/barchart_demo.py
trunk/matplotlib/examples/pylab_examples/mathtext_examples.py
trunk/matplotlib/lib/matplotlib/pyplot.py
trunk/matplotlib/lib/matplotlib/ticker.py
Modified: trunk/matplotlib/examples/api/barchart_demo.py
===================================================================
--- trunk/matplotlib/examples/api/barchart_demo.py 2008-10-15 15:54:33 UTC (rev 6206)
+++ trunk/matplotlib/examples/api/barchart_demo.py 2008-10-15 15:55:29 UTC (rev 6207)
@@ -22,7 +22,8 @@
# add some
ax.set_ylabel('Scores')
ax.set_title('Scores by group and gender')
-ax.set_xticks(ind+width, ('G1', 'G2', 'G3', 'G4', 'G5') )
+ax.set_xticks(ind+width)
+ax.set_xticklabels( ('G1', 'G2', 'G3', 'G4', 'G5') )
ax.legend( (rects1[0], rects2[0]), ('Men', 'Women') )
Modified: trunk/matplotlib/examples/pylab_examples/mathtext_examples.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/mathtext_examples.py 2008-10-15 15:54:33 UTC (rev 6206)
+++ trunk/matplotlib/examples/pylab_examples/mathtext_examples.py 2008-10-15 15:55:29 UTC (rev 6207)
@@ -49,7 +49,6 @@
r'$\widehat{abc}\widetilde{def}$',
r'$\Gamma \Delta \Theta \Lambda \Xi \Pi \Sigma \Upsilon \Phi \Psi \Omega$',
r'$\alpha \beta \gamma \delta \epsilon \zeta \eta \theta \iota \lambda \mu \nu \xi \pi \kappa \rho \sigma \tau \upsilon \phi \chi \psi$',
- #ur'Generic symbol: $\u23ce \mathrm{\ue0f2 \U0001D538}$'
ur'Generic symbol: $\u23ce$',
]
Modified: trunk/matplotlib/lib/matplotlib/pyplot.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/pyplot.py 2008-10-15 15:54:33 UTC (rev 6206)
+++ trunk/matplotlib/lib/matplotlib/pyplot.py 2008-10-15 15:55:29 UTC (rev 6207)
@@ -898,7 +898,7 @@
draw_if_interactive()
return ret
xscale.__doc__ = dedent(xscale.__doc__) % {
- 'scale': ' | '.join([repr(x) for x in get_scale_names()]),
+ 'scale': ' | '.join([repr(_x) for _x in get_scale_names()]),
'scale_docs': get_scale_docs()}
def yscale(*args, **kwargs):
@@ -918,7 +918,7 @@
draw_if_interactive()
return ret
yscale.__doc__ = dedent(yscale.__doc__) % {
- 'scale': ' | '.join([repr(x) for x in get_scale_names()]),
+ 'scale': ' | '.join([repr(_x) for _x in get_scale_names()]),
'scale_docs': get_scale_docs()}
def xticks(*args, **kwargs):
Modified: trunk/matplotlib/lib/matplotlib/ticker.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/ticker.py 2008-10-15 15:54:33 UTC (rev 6206)
+++ trunk/matplotlib/lib/matplotlib/ticker.py 2008-10-15 15:55:29 UTC (rev 6207)
@@ -25,7 +25,7 @@
* FixedLocator - Tick locations are fixed
- * IndexLocator - locator for index plots (eg where x = range(len(y))
+ * IndexLocator - locator for index plots (eg. where x = range(len(y)))
* LinearLocator - evenly spaced ticks from min to max
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2008-10-15 17:49:31
|
Revision: 6209
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6209&view=rev
Author: mdboom
Date: 2008-10-15 17:46:36 +0000 (Wed, 15 Oct 2008)
Log Message:
-----------
Use small icon in documentation; large logo for home page only.
Update application icon to use new colors from website.
Modified Paths:
--------------
trunk/matplotlib/doc/_templates/index.html
trunk/matplotlib/doc/_templates/layout.html
trunk/matplotlib/examples/pylab_examples/matplotlib_icon.py
trunk/matplotlib/lib/matplotlib/mpl-data/images/matplotlib.png
trunk/matplotlib/lib/matplotlib/mpl-data/images/matplotlib.svg
Added Paths:
-----------
trunk/matplotlib/doc/_static/icon.png
Added: trunk/matplotlib/doc/_static/icon.png
===================================================================
(Binary files differ)
Property changes on: trunk/matplotlib/doc/_static/icon.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/matplotlib/doc/_templates/index.html
===================================================================
--- trunk/matplotlib/doc/_templates/index.html 2008-10-15 15:58:27 UTC (rev 6208)
+++ trunk/matplotlib/doc/_templates/index.html 2008-10-15 17:46:36 UTC (rev 6209)
@@ -1,5 +1,13 @@
{% extends "layout.html" %}
{% set title = 'Overview' %}
+
+{% block relbar1 %}
+<div style="background-color: white; text-align: left; padding: 10px 10px 15px 15px">
+<img src="{{ pathto("_static/logo2.png", 1) }}">
+</div>
+{{ super() }}
+{% endblock %}
+
{% block body %}
<h1>Welcome</h1>
@@ -22,10 +30,10 @@
For the power user, you have full control of line styles, font
properties, axes properties, etc, via an object oriented interface
- or via a handle graphics interface familiar to matlab users.
+ or via a handle graphics interface familiar to Matlab® users.
The plotting functions in the <a href=api/pyplot_api.html>pyplot</a>
- interface have a high degree of Matlab® compatibility.<p>
+ interface have a high degree of Matlab® compatibility.<p>
<br>
<table border=1 cellpadding=3 cellspacing=2>
Modified: trunk/matplotlib/doc/_templates/layout.html
===================================================================
--- trunk/matplotlib/doc/_templates/layout.html 2008-10-15 15:58:27 UTC (rev 6208)
+++ trunk/matplotlib/doc/_templates/layout.html 2008-10-15 17:46:36 UTC (rev 6209)
@@ -1,20 +1,15 @@
{% extends "!layout.html" %}
{% block rootrellink %}
- <li><a href="{{ pathto('index') }}">matplotlib home </a> | </li>
- <li><a href="{{ pathto('contents') }}">documentation </a> »</li>
+ <li><a href="{{ pathto('index') }}">
+ <img style="border: none; vertical-align: middle;" src="{{ pathto('_static/icon.png', 1) }}" width="16" height="16"/>
+ matplotlib home</a> | </li>
+ <li><a href="{{ pathto('contents') }}">documentation</a> »</li>
{% endblock %}
-{% block relbar1 %}
-<div style="background-color: white; text-align: left; padding: 10px 10px 15px 15px">
-<img src="{{ pathto("_static/logo2.png", 1) }}">
-</div>
-{{ super() }}
-{% endblock %}
-
{# put the sidebar before the body #}
{% block sidebar1 %}{{ sidebar() }}{% endblock %}
{% block sidebar2 %}{% endblock %}
-
\ No newline at end of file
+
Modified: trunk/matplotlib/examples/pylab_examples/matplotlib_icon.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/matplotlib_icon.py 2008-10-15 15:58:27 UTC (rev 6208)
+++ trunk/matplotlib/examples/pylab_examples/matplotlib_icon.py 2008-10-15 17:46:36 UTC (rev 6209)
@@ -3,19 +3,19 @@
make the matplotlib svg minimization icon
"""
import matplotlib
-matplotlib.use('SVG')
+#matplotlib.use('Svg')
from pylab import *
rc('grid', ls='-', lw=2, color='k')
fig = figure(figsize=(1, 1), dpi=72)
-axes([0.025, 0.025, 0.95, 0.95], axisbg='y')
+axes([0.025, 0.025, 0.95, 0.95], axisbg='#bfd1d4')
t = arange(0, 2, 0.05)
s = sin(2*pi*t)
-plot(t,s, linewidth=4)
+plot(t,s, linewidth=4, color="#ca7900")
axis([-.2, 2.2, -1.2, 1.2])
-grid(True)
+# grid(True)
setp(gca(), xticklabels=[], yticklabels=[])
-#savefig('../images/matplotlib.svg', facecolor='0.75')
+savefig('matplotlib.svg', facecolor='0.75')
Modified: trunk/matplotlib/lib/matplotlib/mpl-data/images/matplotlib.png
===================================================================
(Binary files differ)
Modified: trunk/matplotlib/lib/matplotlib/mpl-data/images/matplotlib.svg
===================================================================
--- trunk/matplotlib/lib/matplotlib/mpl-data/images/matplotlib.svg 2008-10-15 15:58:27 UTC (rev 6208)
+++ trunk/matplotlib/lib/matplotlib/mpl-data/images/matplotlib.svg 2008-10-15 17:46:36 UTC (rev 6209)
@@ -1,269 +1,76 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
-"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with matplotlib (http://matplotlib.sourceforge.net/) -->
<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
- xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.0"
x="0.0"
y="0.0"
width="72.000000"
- height="72.000000"
- id="svg1">
-<g id="figure1">
-<polygon
-style="stroke: #ffffff; stroke-width: 1.000000; stroke-linejoin: miter; stroke-linecap: square; opacity: 1.000000; fill: #bfbfbf; "
- points = "0.000000,72.000000 0.000000,0.000000 72.000000,0.000000 72.000000,72.000000" />
-<g id="axes1">
-<polygon
-style="stroke: #000000; stroke-width: 1.000000; stroke-linejoin: miter; stroke-linecap: square; opacity: 1.000000; fill: #bfbf00; "
- points = "1.800000,70.200000 1.800000,1.800000 70.200000,1.800000 70.200000,70.200000" />
-<g id="matplotlib.axis1">
-<g id="xtick1">
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: square; opacity: 1.000000; fill: none; "
- d="M 7.500000,70.200000 L 7.500000,70.200000 " />
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: butt; opacity: 1.000000; fill: none; "
- d="M 7.500000,70.200000 L 7.500000,66.200000" />
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: butt; opacity: 1.000000; fill: none; "
- d="M 7.500000,70.200000 L 7.500000,66.200000" />
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: square; opacity: 1.000000; fill: none; "
- d="M 7.500000,1.800000 L 7.500000,1.800000 " />
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: butt; opacity: 1.000000; fill: none; "
- d="M 7.500000,5.800000 L 7.500000,1.800000" />
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: butt; opacity: 1.000000; fill: none; "
- d="M 7.500000,5.800000 L 7.500000,1.800000" />
-
-<defs>
- <clipPath id="375800226">
- <rect x="1.800000" y="1.800000" width="68.400000" height="68.400000"
- style="stroke: gray; fill: none;"/>
- </clipPath>
-</defs>
-
-<path
-style="stroke: #000000; stroke-width: 2.000000; stroke-linejoin: miter; stroke-linecap: square; opacity: 1.000000; fill: none; clip-path:url(#375800226); "
- d="M 7.500000,70.200000 L 7.500000,1.800000 " />
-</g>
-<g id="xtick2">
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: square; opacity: 1.000000; fill: none; "
- d="M 21.750000,70.200000 L 21.750000,70.200000 " />
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: butt; opacity: 1.000000; fill: none; "
- d="M 21.750000,70.200000 L 21.750000,66.200000" />
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: butt; opacity: 1.000000; fill: none; "
- d="M 21.750000,70.200000 L 21.750000,66.200000" />
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: square; opacity: 1.000000; fill: none; "
- d="M 21.750000,1.800000 L 21.750000,1.800000 " />
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: butt; opacity: 1.000000; fill: none; "
- d="M 21.750000,5.800000 L 21.750000,1.800000" />
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: butt; opacity: 1.000000; fill: none; "
- d="M 21.750000,5.800000 L 21.750000,1.800000" />
-<path
-style="stroke: #000000; stroke-width: 2.000000; stroke-linejoin: miter; stroke-linecap: square; opacity: 1.000000; fill: none; clip-path:url(#375800226); "
- d="M 21.750000,70.200000 L 21.750000,1.800000 " />
-</g>
-<g id="xtick3">
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: square; opacity: 1.000000; fill: none; "
- d="M 36.000000,70.200000 L 36.000000,70.200000 " />
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: butt; opacity: 1.000000; fill: none; "
- d="M 36.000000,70.200000 L 36.000000,66.200000" />
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: butt; opacity: 1.000000; fill: none; "
- d="M 36.000000,70.200000 L 36.000000,66.200000" />
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: square; opacity: 1.000000; fill: none; "
- d="M 36.000000,1.800000 L 36.000000,1.800000 " />
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: butt; opacity: 1.000000; fill: none; "
- d="M 36.000000,5.800000 L 36.000000,1.800000" />
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: butt; opacity: 1.000000; fill: none; "
- d="M 36.000000,5.800000 L 36.000000,1.800000" />
-<path
-style="stroke: #000000; stroke-width: 2.000000; stroke-linejoin: miter; stroke-linecap: square; opacity: 1.000000; fill: none; clip-path:url(#375800226); "
- d="M 36.000000,70.200000 L 36.000000,1.800000 " />
-</g>
-<g id="xtick4">
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: square; opacity: 1.000000; fill: none; "
- d="M 50.250000,70.200000 L 50.250000,70.200000 " />
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: butt; opacity: 1.000000; fill: none; "
- d="M 50.250000,70.200000 L 50.250000,66.200000" />
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: butt; opacity: 1.000000; fill: none; "
- d="M 50.250000,70.200000 L 50.250000,66.200000" />
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: square; opacity: 1.000000; fill: none; "
- d="M 50.250000,1.800000 L 50.250000,1.800000 " />
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: butt; opacity: 1.000000; fill: none; "
- d="M 50.250000,5.800000 L 50.250000,1.800000" />
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: butt; opacity: 1.000000; fill: none; "
- d="M 50.250000,5.800000 L 50.250000,1.800000" />
-<path
-style="stroke: #000000; stroke-width: 2.000000; stroke-linejoin: miter; stroke-linecap: square; opacity: 1.000000; fill: none; clip-path:url(#375800226); "
- d="M 50.250000,70.200000 L 50.250000,1.800000 " />
-</g>
-<g id="xtick5">
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: square; opacity: 1.000000; fill: none; "
- d="M 64.500000,70.200000 L 64.500000,70.200000 " />
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: butt; opacity: 1.000000; fill: none; "
- d="M 64.500000,70.200000 L 64.500000,66.200000" />
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: butt; opacity: 1.000000; fill: none; "
- d="M 64.500000,70.200000 L 64.500000,66.200000" />
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: square; opacity: 1.000000; fill: none; "
- d="M 64.500000,1.800000 L 64.500000,1.800000 " />
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: butt; opacity: 1.000000; fill: none; "
- d="M 64.500000,5.800000 L 64.500000,1.800000" />
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: butt; opacity: 1.000000; fill: none; "
- d="M 64.500000,5.800000 L 64.500000,1.800000" />
-<path
-style="stroke: #000000; stroke-width: 2.000000; stroke-linejoin: miter; stroke-linecap: square; opacity: 1.000000; fill: none; clip-path:url(#375800226); "
- d="M 64.500000,70.200000 L 64.500000,1.800000 " />
-</g>
-</g>
-<g id="matplotlib.axis2">
-<g id="ytick1">
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: square; opacity: 1.000000; fill: none; "
- d="M 1.800000,64.500000 L 1.800000,64.500000 " />
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: butt; opacity: 1.000000; fill: none; "
- d="M 1.800000,64.500000 L 5.800000,64.500000" />
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: butt; opacity: 1.000000; fill: none; "
- d="M 1.800000,64.500000 L 5.800000,64.500000" />
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: square; opacity: 1.000000; fill: none; "
- d="M 70.200000,64.500000 L 70.200000,64.500000 " />
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: butt; opacity: 1.000000; fill: none; "
- d="M 66.200000,64.500000 L 70.200000,64.500000" />
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: butt; opacity: 1.000000; fill: none; "
- d="M 66.200000,64.500000 L 70.200000,64.500000" />
-<path
-style="stroke: #000000; stroke-width: 2.000000; stroke-linejoin: miter; stroke-linecap: square; opacity: 1.000000; fill: none; clip-path:url(#375800226); "
- d="M 1.800000,64.500000 L 70.200000,64.500000 " />
-</g>
-<g id="ytick2">
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: square; opacity: 1.000000; fill: none; "
- d="M 1.800000,50.250000 L 1.800000,50.250000 " />
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: butt; opacity: 1.000000; fill: none; "
- d="M 1.800000,50.250000 L 5.800000,50.250000" />
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: butt; opacity: 1.000000; fill: none; "
- d="M 1.800000,50.250000 L 5.800000,50.250000" />
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: square; opacity: 1.000000; fill: none; "
- d="M 70.200000,50.250000 L 70.200000,50.250000 " />
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: butt; opacity: 1.000000; fill: none; "
- d="M 66.200000,50.250000 L 70.200000,50.250000" />
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: butt; opacity: 1.000000; fill: none; "
- d="M 66.200000,50.250000 L 70.200000,50.250000" />
-<path
-style="stroke: #000000; stroke-width: 2.000000; stroke-linejoin: miter; stroke-linecap: square; opacity: 1.000000; fill: none; clip-path:url(#375800226); "
- d="M 1.800000,50.250000 L 70.200000,50.250000 " />
-</g>
-<g id="ytick3">
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: square; opacity: 1.000000; fill: none; "
- d="M 1.800000,36.000000 L 1.800000,36.000000 " />
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: butt; opacity: 1.000000; fill: none; "
- d="M 1.800000,36.000000 L 5.800000,36.000000" />
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: butt; opacity: 1.000000; fill: none; "
- d="M 1.800000,36.000000 L 5.800000,36.000000" />
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: square; opacity: 1.000000; fill: none; "
- d="M 70.200000,36.000000 L 70.200000,36.000000 " />
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: butt; opacity: 1.000000; fill: none; "
- d="M 66.200000,36.000000 L 70.200000,36.000000" />
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: butt; opacity: 1.000000; fill: none; "
- d="M 66.200000,36.000000 L 70.200000,36.000000" />
-<path
-style="stroke: #000000; stroke-width: 2.000000; stroke-linejoin: miter; stroke-linecap: square; opacity: 1.000000; fill: none; clip-path:url(#375800226); "
- d="M 1.800000,36.000000 L 70.200000,36.000000 " />
-</g>
-<g id="ytick4">
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: square; opacity: 1.000000; fill: none; "
- d="M 1.800000,21.750000 L 1.800000,21.750000 " />
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: butt; opacity: 1.000000; fill: none; "
- d="M 1.800000,21.750000 L 5.800000,21.750000" />
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: butt; opacity: 1.000000; fill: none; "
- d="M 1.800000,21.750000 L 5.800000,21.750000" />
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: square; opacity: 1.000000; fill: none; "
- d="M 70.200000,21.750000 L 70.200000,21.750000 " />
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: butt; opacity: 1.000000; fill: none; "
- d="M 66.200000,21.750000 L 70.200000,21.750000" />
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: butt; opacity: 1.000000; fill: none; "
- d="M 66.200000,21.750000 L 70.200000,21.750000" />
-<path
-style="stroke: #000000; stroke-width: 2.000000; stroke-linejoin: miter; stroke-linecap: square; opacity: 1.000000; fill: none; clip-path:url(#375800226); "
- d="M 1.800000,21.750000 L 70.200000,21.750000 " />
-</g>
-<g id="ytick5">
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: square; opacity: 1.000000; fill: none; "
- d="M 1.800000,7.500000 L 1.800000,7.500000 " />
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: butt; opacity: 1.000000; fill: none; "
- d="M 1.800000,7.500000 L 5.800000,7.500000" />
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: butt; opacity: 1.000000; fill: none; "
- d="M 1.800000,7.500000 L 5.800000,7.500000" />
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: square; opacity: 1.000000; fill: none; "
- d="M 70.200000,7.500000 L 70.200000,7.500000 " />
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: butt; opacity: 1.000000; fill: none; "
- d="M 66.200000,7.500000 L 70.200000,7.500000" />
-<path
-style="stroke: #000000; stroke-width: 0.500000; stroke-linejoin: miter; stroke-linecap: butt; opacity: 1.000000; fill: none; "
- d="M 66.200000,7.500000 L 70.200000,7.500000" />
-<path
-style="stroke: #000000; stroke-width: 2.000000; stroke-linejoin: miter; stroke-linecap: square; opacity: 1.000000; fill: none; clip-path:url(#375800226); "
- d="M 1.800000,7.500000 L 70.200000,7.500000 " />
-</g>
-</g>
-<path
-style="stroke: #0000ff; stroke-width: 4.000000; stroke-linejoin: miter; stroke-linecap: square; opacity: 1.000000; fill: none; clip-path:url(#375800226); "
- d="M 7.500000,36.000000 L 8.925000,27.193016 L 10.350000,19.248120 L 11.775000,12.943016 L 13.200000,8.894889 L 14.625000,7.500000 L 16.050000,8.894889 L 17.475000,12.943016 L 18.900000,19.248120 L 20.325000,27.193016 L 21.750000,36.000000 L 23.175000,44.806984 L 24.600000,52.751880 L 26.025000,59.056984 L 27.450000,63.105111 L 28.875000,64.500000 L 30.300000,63.105111 L 31.725000,59.056984 L 33.150000,52.751880 L 34.575000,44.806984 L 36.000000,36.000000 L 37.425000,27.193016 L 38.850000,19.248120 L 40.275000,12.943016 L 41.700000,8.894889 L 43.125000,7.500000 L 44.550000,8.894889 L 45.975000,12.943016 L 47.400000,19.248120 L 48.825000,27.193016 L 50.250000,36.000000 L 51.675000,44.806984 L 53.100000,52.751880 L 54.525000,59.056984 L 55.950000,63.105111 L 57.375000,64.500000 L 58.800000,63.105111 L 60.225000,59.056984 L 61.650000,52.751880 L 63.075000,44.806984 " />
-</g>
-</g>
+ height="72.000000"
+ id="svg1"
+ sodipodi:version="0.32"
+ inkscape:version="0.46"
+ sodipodi:docname="matplotlib.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape"
+ inkscape:export-filename="/wonkabar/data1/builds/matplotlib/lib/matplotlib/mpl-data/images/matplotlib.png"
+ inkscape:export-xdpi="78.900002"
+ inkscape:export-ydpi="78.900002">
+ <metadata
+ id="metadata2903">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <defs
+ id="defs2901">
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 36 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="72 : 36 : 1"
+ inkscape:persp3d-origin="36 : 24 : 1"
+ id="perspective2905" />
+ </defs>
+ <sodipodi:namedview
+ inkscape:window-height="725"
+ inkscape:window-width="1250"
+ inkscape:pageshadow="2"
+ inkscape:pageopacity="0.0"
+ guidetolerance="10.0"
+ gridtolerance="10.0"
+ objecttolerance="10.0"
+ borderopacity="1.0"
+ bordercolor="#666666"
+ pagecolor="#ffffff"
+ id="base"
+ showgrid="false"
+ inkscape:zoom="6.4722222"
+ inkscape:cx="36"
+ inkscape:cy="36"
+ inkscape:window-x="411"
+ inkscape:window-y="278"
+ inkscape:current-layer="svg1" />
+ <polygon
+ id="polygon2736"
+ points="0,72 0,0 72,0 72,72 0,72 "
+ style="fill:#bfbfbf;stroke:#ffffff;stroke-width:1;stroke-linecap:square;stroke-linejoin:miter" />
+ <polygon
+ style="fill:#bfd1d4;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:miter;fill-opacity:1"
+ points="1.8,70.2 1.8,1.8 70.2,1.8 70.2,70.2 1.8,70.2 "
+ id="polygon2739" />
+ <path
+ style="fill:none;stroke:#ca7900;stroke-width:4;stroke-linecap:square;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 7.5,36 L 8.925,27.193016 L 10.35,19.24812 L 11.775,12.943016 L 13.2,8.894889 L 14.625,7.5 L 16.05,8.894889 L 17.475,12.943016 L 18.9,19.24812 L 20.325,27.193016 L 21.75,36 L 23.175,44.806984 L 24.6,52.75188 L 26.025,59.056984 L 27.45,63.105111 L 28.875,64.5 L 30.3,63.105111 L 31.725,59.056984 L 33.15,52.75188 L 34.575,44.806984 L 36,36 L 37.425,27.193016 L 38.85,19.24812 L 40.275,12.943016 L 41.7,8.894889 L 43.125,7.5 L 44.55,8.894889 L 45.975,12.943016 L 47.4,19.24812 L 48.825,27.193016 L 50.25,36 L 51.675,44.806984 L 53.1,52.75188 L 54.525,59.056984 L 55.95,63.105111 L 57.375,64.5 L 58.8,63.105111 L 60.225,59.056984 L 61.65,52.75188 L 63.075,44.806984"
+ id="path2898" />
</svg>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2008-10-15 19:45:06
|
Revision: 6214
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6214&view=rev
Author: mdboom
Date: 2008-10-15 19:44:58 +0000 (Wed, 15 Oct 2008)
Log Message:
-----------
Fix bug in clipping in the simplifier
Modified Paths:
--------------
trunk/matplotlib/src/agg_py_path_iterator.h
Added Paths:
-----------
trunk/matplotlib/examples/pylab_examples/simplification_clipping_test.py
Added: trunk/matplotlib/examples/pylab_examples/simplification_clipping_test.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/simplification_clipping_test.py (rev 0)
+++ trunk/matplotlib/examples/pylab_examples/simplification_clipping_test.py 2008-10-15 19:44:58 UTC (rev 6214)
@@ -0,0 +1,11 @@
+from pylab import *
+
+t = arange(0.0, 2.0, 0.01)
+s = sin(2*pi*t)
+plot(t, s, linewidth=1.0)
+
+ylim((-0.20, -0.28))
+
+title('Should see four lines extending from bottom to top')
+grid(True)
+show()
Modified: trunk/matplotlib/src/agg_py_path_iterator.h
===================================================================
--- trunk/matplotlib/src/agg_py_path_iterator.h 2008-10-15 18:48:00 UTC (rev 6213)
+++ trunk/matplotlib/src/agg_py_path_iterator.h 2008-10-15 19:44:58 UTC (rev 6214)
@@ -281,6 +281,10 @@
(*y < -1.0 && m_lasty < -1.0) ||
(*y > m_height && m_lasty > m_height)))
{
+ if (!m_clipped)
+ {
+ queue_push(agg::path_cmd_line_to, m_lastx, m_lasty);
+ }
m_lastx = *x;
m_lasty = *y;
m_clipped = true;
@@ -451,7 +455,7 @@
bool m_simplify;
double m_width, m_height;
- static const int m_queue_size = 6;
+ static const int m_queue_size = 7;
int m_queue_read;
int m_queue_write;
item m_queue[m_queue_size];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2008-10-15 19:47:58
|
Revision: 6215
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6215&view=rev
Author: jdh2358
Date: 2008-10-15 19:47:43 +0000 (Wed, 15 Oct 2008)
Log Message:
-----------
added thinner logo, removed mpl icon from matplotlib home
Modified Paths:
--------------
trunk/matplotlib/doc/_static/logo2.png
trunk/matplotlib/doc/_templates/index.html
trunk/matplotlib/doc/_templates/layout.html
trunk/matplotlib/examples/api/logo2.py
Modified: trunk/matplotlib/doc/_static/logo2.png
===================================================================
(Binary files differ)
Modified: trunk/matplotlib/doc/_templates/index.html
===================================================================
--- trunk/matplotlib/doc/_templates/index.html 2008-10-15 19:44:58 UTC (rev 6214)
+++ trunk/matplotlib/doc/_templates/index.html 2008-10-15 19:47:43 UTC (rev 6215)
@@ -1,12 +1,6 @@
{% extends "layout.html" %}
{% set title = 'Overview' %}
-{% block relbar1 %}
-<div style="background-color: white; text-align: left; padding: 10px 10px 15px 15px">
-<img src="{{ pathto("_static/logo2.png", 1) }}">
-</div>
-{{ super() }}
-{% endblock %}
{% block body %}
<h1>Welcome</h1>
Modified: trunk/matplotlib/doc/_templates/layout.html
===================================================================
--- trunk/matplotlib/doc/_templates/layout.html 2008-10-15 19:44:58 UTC (rev 6214)
+++ trunk/matplotlib/doc/_templates/layout.html 2008-10-15 19:47:43 UTC (rev 6215)
@@ -1,12 +1,18 @@
{% extends "!layout.html" %}
{% block rootrellink %}
- <li><a href="{{ pathto('index') }}">
- <img style="border: none; vertical-align: middle;" src="{{ pathto('_static/icon.png', 1) }}" width="16" height="16"/>
- matplotlib home</a> | </li>
- <li><a href="{{ pathto('contents') }}">documentation</a> »</li>
+ <li><a href="{{ pathto('index') }}">matplotlib home </a> | </li>
+ <li><a href="{{ pathto('contents') }}">documentation </a> »</li>
{% endblock %}
+
+{% block relbar1 %}
+<div style="background-color: white; text-align: left; padding: 10px 10px 15px 15px">
+<img src="{{ pathto("_static/logo2.png", 1) }}">
+</div>
+{{ super() }}
+{% endblock %}
+
{# put the sidebar before the body #}
{% block sidebar1 %}{{ sidebar() }}{% endblock %}
{% block sidebar2 %}{% endblock %}
Modified: trunk/matplotlib/examples/api/logo2.py
===================================================================
--- trunk/matplotlib/examples/api/logo2.py 2008-10-15 19:44:58 UTC (rev 6214)
+++ trunk/matplotlib/examples/api/logo2.py 2008-10-15 19:47:43 UTC (rev 6215)
@@ -1,73 +1,73 @@
+"""
+Thanks to Tony Yu <ts...@gm...> for the logo design
+"""
+
import numpy as np
+import matplotlib as mpl
import matplotlib.pyplot as plt
import matplotlib.cm as cm
import matplotlib.mlab as mlab
+from pylab import rand
+mpl.rcParams['xtick.labelsize'] = 6
+mpl.rcParams['ytick.labelsize'] = 6
+mpl.rcParams['axes.edgecolor'] = 'gray'
+
+
axalpha = 0.05
-figcolor = '#FFFFCC'
+#figcolor = '#EFEFEF'
+figcolor = 'white'
dpi = 80
-fig = plt.figure(figsize=(8, 2),dpi=dpi)
-fig.patch.set_edgecolor(figcolor)
-fig.patch.set_facecolor(figcolor)
+fig = plt.figure(figsize=(6, 1.),dpi=dpi)
+fig.figurePatch.set_edgecolor(figcolor)
+fig.figurePatch.set_facecolor(figcolor)
-# the polar bar plot
-ax = fig.add_axes([0.05, 0.05, 0.2, 01], polar=True)
-ax.patch.set_alpha(axalpha)
-N = 20
-theta = np.arange(0.0, 2*np.pi, 2*np.pi/N) + np.pi
-radii = 10*np.random.rand(N)
-width = np.pi/6*np.random.rand(N)
-#radii = np.log(np.arange(1,N+1))
-#width = np.arange(N, dtype=float)/N*np.pi/8
-bars = ax.bar(theta, radii, width=width, bottom=0.0)
-for r,bar in zip(radii, bars):
- bar.set_facecolor( cm.jet(r/10.))
- bar.set_alpha(0.5)
+def add_math_background():
+ ax = fig.add_axes([0., 0., 1., 1.])
-for label in ax.get_xticklabels() + ax.get_yticklabels():
- label.set_visible(False)
+ text = []
+ text.append((r"$W^{3\beta}_{\delta_1 \rho_1 \sigma_2} = U^{3\beta}_{\delta_1 \rho_1} + \frac{1}{8 \pi 2} \int^{\alpha_2}_{\alpha_2} d \alpha^\prime_2 \left[\frac{ U^{2\beta}_{\delta_1 \rho_1} - \alpha^\prime_2U^{1\beta}_{\rho_1 \sigma_2} }{U^{0\beta}_{\rho_1 \sigma_2}}\right]$", (0.7, 0.2), 20))
+ text.append((r"$\frac{d\rho}{d t} + \rho \vec{v}\cdot\nabla\vec{v} = -\nabla p + \mu\nabla^2 \vec{v} + \rho \vec{g}$",
+ (0.35, 0.9), 20))
+ text.append((r"$\int_{-\infty}^\infty e^{-x^2}dx=\sqrt{\pi}$",
+ (0.15, 0.3), 25))
+ #text.append((r"$E = mc^2 = \sqrt{{m_0}^2c^4 + p^2c^2}$",
+ # (0.7, 0.42), 30))
+ text.append((r"$F_G = G\frac{m_1m_2}{r^2}$",
+ (0.85, 0.7), 30))
+ for eq, (x, y), size in text:
+ ax.text(x, y, eq, ha='center', va='center', color="#11557c", alpha=0.25,
+ transform=ax.transAxes, fontsize=size)
+ ax.set_axis_off()
+ return ax
+def add_matplotlib_text(ax):
+ ax.text(0.975, 0.5, 'matplotlib', color='#11557c', fontsize=65,
+ ha='right', va='center', alpha=1.0, transform=ax.transAxes)
-# the histogram
-axhist = fig.add_axes([0.275, 0.075, 0.2, 0.4])
-axhist.patch.set_alpha(axalpha)
-mu, sigma = 100, 15
-x = mu + sigma*np.random.randn(10000)
+def add_polar_bar():
+ ax = fig.add_axes([0.05, 0.1, 0.2, 0.8], polar=True)
+ ax.axesPatch.set_alpha(axalpha)
+ N = 7
+ arc = 2. * np.pi
+ theta = np.arange(0.0, arc, arc/N)
+ radii = 10 * np.array([0.2, 0.6, 1.0, 0.7, 0.4, 0.5, 0.8])
+ width = np.pi / 4 * np.array([0.4, 0.4, 0.6, 0.8, 0.2, 0.5, 0.3])
+ bars = ax.bar(theta, radii, width=width, bottom=0.0)
+ for r, bar in zip(radii, bars):
+ bar.set_facecolor(cm.jet(r/10.))
+ bar.set_alpha(0.6)
-# the histogram of the data
-n, bins, patches = axhist.hist(x, 20, normed=1,
- facecolor='green', edgecolor='green', alpha=0.75)
+if __name__ == '__main__':
+ main_axes = add_math_background()
+ add_polar_bar()
+# add_histogram()
+# add_scatter()
+# add_pcolor()
+ #add_pcolor2()
+ add_matplotlib_text(main_axes)
+ fig.savefig('logo2.png', facecolor=figcolor, edgecolor=figcolor, dpi=dpi)
+ plt.show()
-y = mlab.normpdf( bins, mu, sigma)
-l = axhist.plot(bins, y, 'r', lw=1)
-
-axhist.set_title('Density of IQ',fontsize=6)
-axhist.set_xlabel('IQ', fontsize=6)
-axhist.set_ylabel('P(IQ)', fontsize=6)
-ax.set_xlim(-2*sigma, 2*sigma)
-for label in axhist.get_xticklabels() + axhist.get_yticklabels():
- label.set_visible(False)
-
-
-axback = fig.add_axes([0., 0., 1., 1.])
-
-#the math background
-tex = r"$W^{3\beta}_{\delta_1 \rho_1 \sigma_2} = U^{3\beta}_{\delta_1 \rho_1} + \frac{1}{8 \pi 2} \int^{\alpha_2}_{\alpha_2} d \alpha^\prime_2 \left[\frac{ U^{2\beta}_{\delta_1 \rho_1} - \alpha^\prime_2U^{1\beta}_{\rho_1 \sigma_2} }{U^{0\beta}_{\rho_1 \sigma_2}}\right]$"
-radargreen = '#d5de9c'
-orange = '#ee8d18'
-axback.text(0.5, 0.5, tex,
- transform=axback.transAxes, color='black', alpha=0.25, fontsize=40,
- ha='center', va='center')
-axback.set_axis_off()
-
-# the matplotlib title
-axback.text(0.3, 0.95, 'matplotlib', color='black', fontsize=75,
- ha='left', va='top', alpha=1.0,
- transform=axback.transAxes)
-
-
-fig.savefig('logo2.png', facecolor=figcolor, edgecolor=figcolor, dpi=dpi)
-plt.show()
-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2008-10-16 17:32:49
|
Revision: 6223
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6223&view=rev
Author: mdboom
Date: 2008-10-16 17:32:39 +0000 (Thu, 16 Oct 2008)
Log Message:
-----------
Improve auto-generated property tables to have links from the name of the property to the setter method. This is useful since many properties are not self-explanatory from their "ACCEPTS" list alone.
Parse multi-line "ACCEPTS" statements in docstrings.
Clean-up markup in FancyBoxPatch and related classes.
Syntax highlight ipython session example.
Judicious use of "seealso::"
Lots of grammatical and capitalization clean-up
Modified Paths:
--------------
trunk/matplotlib/doc/devel/outline.rst
trunk/matplotlib/doc/users/shell.rst
trunk/matplotlib/lib/matplotlib/artist.py
trunk/matplotlib/lib/matplotlib/axes.py
trunk/matplotlib/lib/matplotlib/backend_bases.py
trunk/matplotlib/lib/matplotlib/collections.py
trunk/matplotlib/lib/matplotlib/colors.py
trunk/matplotlib/lib/matplotlib/dates.py
trunk/matplotlib/lib/matplotlib/image.py
trunk/matplotlib/lib/matplotlib/lines.py
trunk/matplotlib/lib/matplotlib/mathtext.py
trunk/matplotlib/lib/matplotlib/mlab.py
trunk/matplotlib/lib/matplotlib/patches.py
trunk/matplotlib/lib/matplotlib/path.py
trunk/matplotlib/lib/matplotlib/pyplot.py
trunk/matplotlib/lib/matplotlib/text.py
trunk/matplotlib/lib/matplotlib/ticker.py
trunk/matplotlib/lib/matplotlib/transforms.py
Modified: trunk/matplotlib/doc/devel/outline.rst
===================================================================
--- trunk/matplotlib/doc/devel/outline.rst 2008-10-16 17:23:18 UTC (rev 6222)
+++ trunk/matplotlib/doc/devel/outline.rst 2008-10-16 17:32:39 UTC (rev 6223)
@@ -75,7 +75,7 @@
there.
==================== =========== ===================
-Module Author Status
+Module Author Status
==================== =========== ===================
backend_agg needs conversion
backend_cairo needs conversion
@@ -143,7 +143,7 @@
scale needs conversion
table needs conversion
texmanager Darren needs conversion
-text Mike needs conversion
+text Mike converted
ticker Mike needs conversion
transforms needs conversion
type1font needs conversion
Modified: trunk/matplotlib/doc/users/shell.rst
===================================================================
--- trunk/matplotlib/doc/users/shell.rst 2008-10-16 17:23:18 UTC (rev 6222)
+++ trunk/matplotlib/doc/users/shell.rst 2008-10-16 17:32:39 UTC (rev 6223)
@@ -25,8 +25,9 @@
Fortunately, `ipython <http://ipython.scipy.org/dist>`_, an enhanced
interactive python shell, has figured out all of these tricks, and is
-matplotlib aware, so when you start ipython in the *pylab* mode::
+matplotlib aware, so when you start ipython in the *pylab* mode.
+.. sourcecode:: ipython
johnh@flag:~> ipython -pylab
Python 2.4.5 (#4, Apr 12 2008, 09:09:16)
Modified: trunk/matplotlib/lib/matplotlib/artist.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/artist.py 2008-10-16 17:23:18 UTC (rev 6222)
+++ trunk/matplotlib/lib/matplotlib/artist.py 2008-10-16 17:32:39 UTC (rev 6223)
@@ -81,14 +81,14 @@
# TODO: add legend support
def have_units(self):
- 'return *True* if units are set on the x or y axes'
+ 'Return *True* if units are set on the *x* or *y* axes'
ax = self.axes
if ax is None or ax.xaxis is None:
return False
return ax.xaxis.have_units() or ax.yaxis.have_units()
def convert_xunits(self, x):
- """for artists in an axes, if the xaxis as units support,
+ """For artists in an axes, if the xaxis has units support,
convert *x* using xaxis unit type
"""
ax = getattr(self, 'axes', None)
@@ -98,7 +98,7 @@
return ax.xaxis.convert_units(x)
def convert_yunits(self, y):
- """for artists in an axes, if the yaxis as units support,
+ """For artists in an axes, if the yaxis has units support,
convert *y* using yaxis unit type
"""
ax = getattr(self, 'axes', None)
@@ -107,39 +107,64 @@
def set_axes(self, axes):
"""
- set the axes instance in which the artist resides, if any
+ Set the :class:`~matplotlib.axes.Axes` instance in which the
+ artist resides, if any.
- ACCEPTS: an axes instance
+ ACCEPTS: an :class:`~matplotlib.axes.Axes` instance
"""
self.axes = axes
def get_axes(self):
- 'return the axes instance the artist resides in, or *None*'
+ """
+ Return the :class:`~matplotlib.axes.Axes` instance the artist
+ resides in, or *None*
+ """
return self.axes
def add_callback(self, func):
+ """
+ Adds a callback function that will be called whenever one of
+ the :class:`Artist`'s properties changes.
+
+ Returns an *id* that is useful for removing the callback with
+ :meth:`remove_callback` later.
+ """
oid = self._oid
self._propobservers[oid] = func
self._oid += 1
return oid
def remove_callback(self, oid):
+ """
+ Remove a callback based on its *id*.
+
+ .. seealso::
+ :meth:`add_callback`
+ """
try: del self._propobservers[oid]
except KeyError: pass
def pchanged(self):
- 'fire event when property changed'
+ """
+ Fire an event when property changed, calling all of the
+ registered callbacks.
+ """
for oid, func in self._propobservers.items():
func(self)
def is_transform_set(self):
- 'Artist has transform explicity let'
+ """
+ Returns *True* if :class:`Artist` has a transform explicitly
+ set.
+ """
return self._transformSet
def set_transform(self, t):
"""
Set the :class:`~matplotlib.transforms.Transform` instance
used by this artist.
+
+ ACCEPTS: :class:`~matplotlib.transforms.Transform` instance
"""
self._transform = t
self._transformSet = True
@@ -154,8 +179,10 @@
self._transform = IdentityTransform()
return self._transform
- def hitlist(self,event):
- """List the children of the artist which contain the mouse event"""
+ def hitlist(self, event):
+ """
+ List the children of the artist which contain the mouse event *event*.
+ """
import traceback
L = []
try:
@@ -172,7 +199,10 @@
return L
def get_children(self):
- 'return a list of the child artist this artist contains'
+ """
+ Return a list of the child :class:`Artist`s this
+ :class:`Artist` contains.
+ """
return []
def contains(self, mouseevent):
@@ -188,23 +218,29 @@
return False,{}
def set_contains(self,picker):
- """Replace the contains test used by this artist. The new picker should
- be a callable function which determines whether the artist is hit by the
- mouse event::
+ """
+ Replace the contains test used by this artist. The new picker
+ should be a callable function which determines whether the
+ artist is hit by the mouse event::
hit, props = picker(artist, mouseevent)
- If the mouse event is over the artist, return *hit=True* and *props*
- is a dictionary of properties you want returned with the contains test.
+ If the mouse event is over the artist, return *hit* = *True*
+ and *props* is a dictionary of properties you want returned
+ with the contains test.
+
+ ACCEPTS: a callable function
"""
self._contains = picker
def get_contains(self):
- 'return the _contains test used by the artist, or *None* for default.'
+ """
+ Return the _contains test used by the artist, or *None* for default.
+ """
return self._contains
def pickable(self):
- 'return *True* if self is pickable'
+ 'Return *True* if :class:`Artist` is pickable.'
return (self.figure is not None and
self.figure.canvas is not None and
self._picker is not None)
@@ -234,7 +270,7 @@
def set_picker(self, picker):
"""
- set the epsilon for picking used by this artist
+ Set the epsilon for picking used by this artist
*picker* can be one of the following:
@@ -267,10 +303,14 @@
self._picker = picker
def get_picker(self):
- 'return the Pickeration instance used by this artist'
+ 'Return the picker object used by this artist'
return self._picker
def is_figure_set(self):
+ """
+ Returns True if the artist is assigned to a
+ :class:`~matplotlib.figure.Figure`.
+ """
return self.figure is not None
def get_figure(self):
@@ -292,9 +332,9 @@
def set_clip_box(self, clipbox):
"""
- Set the artist's clip Bbox
+ Set the artist's clip :class:`~matplotlib.transforms.Bbox`.
- ACCEPTS: a :class:`matplotlib.transform.Bbox` instance
+ ACCEPTS: a :class:`matplotlib.transforms.Bbox` instance
"""
self.clipbox = clipbox
self.pchanged()
@@ -316,9 +356,9 @@
rectangle, this method will set the clipping box to the
corresponding rectangle and set the clipping path to *None*.
- ACCEPTS: a :class:`~matplotlib.path.Path` instance and a
- :class:`~matplotlib.transforms.Transform` instance, a
- :class:`~matplotlib.patches.Patch` instance, or *None*.
+ ACCEPTS: [ (:class:`~matplotlib.path.Path`,
+ :class:`~matplotlib.transforms.Transform`) |
+ :class:`~matplotlib.patches.Patch` | None ]
"""
from patches import Patch, Rectangle
@@ -355,11 +395,11 @@
return self._alpha
def get_visible(self):
- "return the artist's visiblity"
+ "Return the artist's visiblity"
return self._visible
def get_animated(self):
- "return the artist's animated state"
+ "Return the artist's animated state"
return self._animated
def get_clip_on(self):
@@ -386,7 +426,7 @@
def set_clip_on(self, b):
"""
- Set whether artist uses clipping
+ Set whether artist uses clipping.
ACCEPTS: [True | False]
"""
@@ -394,7 +434,7 @@
self.pchanged()
def _set_gc_clip(self, gc):
- 'set the clip properly for the gc'
+ 'Set the clip properly for the gc'
if self._clipon:
if self.clipbox is not None:
gc.set_clip_rectangle(self.clipbox)
@@ -412,7 +452,7 @@
Set the alpha value used for blending - not supported on
all backends
- ACCEPTS: float
+ ACCEPTS: float (0.0 transparent through 1.0 opaque)
"""
self._alpha = alpha
self.pchanged()
@@ -430,7 +470,7 @@
def set_visible(self, b):
"""
- set the artist's visiblity
+ Set the artist's visiblity.
ACCEPTS: [True | False]
"""
@@ -440,7 +480,7 @@
def set_animated(self, b):
"""
- set the artist's animation state
+ Set the artist's animation state.
ACCEPTS: [True | False]
"""
@@ -448,6 +488,10 @@
self.pchanged()
def update(self, props):
+ """
+ Update the properties of this :class:`Artist` from the
+ dictionary *prop*.
+ """
store = self.eventson
self.eventson = False
changed = False
@@ -462,11 +506,14 @@
def get_label(self):
+ """
+ Get the label used for this artist in the legend.
+ """
return self._label
def set_label(self, s):
"""
- Set the line label to *s* for auto legend
+ Set the label to *s* for auto legend.
ACCEPTS: any string
"""
@@ -475,11 +522,16 @@
- def get_zorder(self): return self.zorder
+ def get_zorder(self):
+ """
+ Return the :class:`Artist`'s zorder.
+ """
+ return self.zorder
def set_zorder(self, level):
"""
- Set the zorder for the artist
+ Set the zorder for the artist. Artists with lower zorder
+ values are drawn first.
ACCEPTS: any number
"""
@@ -600,7 +652,7 @@
aliases[fullname[4:]] = name[4:]
return aliases
- _get_valid_values_regex = re.compile(r"\n\s*ACCEPTS:\s*(.*)\n")
+ _get_valid_values_regex = re.compile(r"\n\s*ACCEPTS:\s*((?:.|\n)*?)(?:$|(?:\n\n))")
def get_valid_values(self, attr):
"""
Get the legal arguments for the setter associated with *attr*.
@@ -625,25 +677,38 @@
match = self._get_valid_values_regex.search(docstring)
if match is not None:
- return match.group(1)
+ return match.group(1).replace('\n', ' ')
return 'unknown'
- def get_setters(self):
+ def _get_setters_and_targets(self):
"""
- Get the attribute strings with setters for object. Eg., for a line,
- return ``['markerfacecolor', 'linewidth', ....]``.
+ Get the attribute strings and a full path to where the setter
+ is defined for all setters in an object.
"""
setters = []
for name in dir(self.o):
if not name.startswith('set_'): continue
- o = getattr(self.o,name)
+ o = getattr(self.o, name)
if not callable(o): continue
func = o
if self.is_alias(func): continue
- setters.append(name[4:])
+ source_class = self.o.__module__ + "." + self.o.__name__
+ for cls in self.o.mro():
+ if name in cls.__dict__:
+ source_class = cls.__module__ + "." + cls.__name__
+ break
+ setters.append((name[4:], source_class + "." + name))
return setters
+ def get_setters(self):
+ """
+ Get the attribute strings with setters for object. Eg., for a line,
+ return ``['markerfacecolor', 'linewidth', ....]``.
+ """
+
+ return [prop for prop, target in self._get_setters_and_targets()]
+
def is_alias(self, o):
"""
Return *True* if method object *o* is an alias for another
@@ -653,7 +718,7 @@
if ds is None: return False
return ds.startswith('alias for ')
- def aliased_name(self, s):
+ def aliased_name(self, s, target):
"""
return 'PROPNAME or alias' if *s* has an alias, else return
PROPNAME.
@@ -662,9 +727,10 @@
alias, return 'markerfacecolor or mfc' and for the transform
property, which does not, return 'transform'
"""
+
if s in self.aliasd:
- return '%s or %s' % (s, self.aliasd[s])
- else: return s
+ return ':meth:`%s <%s>` or %s' % (s, target, self.aliasd[s])
+ else: return ':meth:`%s <%s>`' % (s, target)
def pprint_setters(self, prop=None, leadingspace=2):
"""
@@ -683,13 +749,13 @@
accepts = self.get_valid_values(prop)
return '%s%s: %s' %(pad, prop, accepts)
- attrs = self.get_setters()
+ attrs = self._get_setters_and_targets()
attrs.sort()
lines = []
########
- names = [self.aliased_name(prop) for prop in attrs]
- accepts = [self.get_valid_values(prop) for prop in attrs]
+ names = [self.aliased_name(prop, target) for prop, target in attrs]
+ accepts = [self.get_valid_values(prop) for prop, target in attrs]
col0_len = max([len(n) for n in names])
col1_len = max([len(a) for a in accepts])
@@ -709,9 +775,9 @@
return lines
########
- for prop in attrs:
+ for prop, path in attrs:
accepts = self.get_valid_values(prop)
- name = self.aliased_name(prop)
+ name = self.aliased_name(prop, path)
lines.append('%s%s: %s' %(pad, name, accepts))
return lines
@@ -792,17 +858,17 @@
getp(o, 'linestyle') # get the linestyle property
- o is a :class:`Artist` instance, eg
+ *o* is a :class:`Artist` instance, eg
:class:`~matplotllib.lines.Line2D` or an instance of a
:class:`~matplotlib.axes.Axes` or :class:`matplotlib.text.Text`.
If the *property* is 'somename', this function returns
o.get_somename()
- getp can be used to query all the gettable properties with getp(o)
- Many properties have aliases for shorter typing, eg 'lw' is an
- alias for 'linewidth'. In the output, aliases and full property
- names will be listed as::
+ :func:`getp` can be used to query all the gettable properties with
+ ``getp(o)``. Many properties have aliases for shorter typing, e.g.
+ 'lw' is an alias for 'linewidth'. In the output, aliases and full
+ property names will be listed as::
property or alias = value
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py 2008-10-16 17:23:18 UTC (rev 6222)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2008-10-16 17:32:39 UTC (rev 6223)
@@ -41,10 +41,10 @@
* '.b': blue dots
* 'r--': red dashed lines
- See :func:`~matplotlib.Line2D.lineStyles` and
- :func:`~matplotlib.pyplot.colors` for all possible styles and
- color format string.
-
+ .. seealso::
+ :func:`~matplotlib.Line2D.lineStyles` and
+ :func:`~matplotlib.pyplot.colors`:
+ for all possible styles and color format string.
"""
linestyle = None
@@ -419,12 +419,11 @@
:class:`~matplotlib.patches.Polygon`, etc., and sets the
coordinate system.
- The :class:`Axes` instance supports callbacks through a callbacks attribute
- which is a :class:`~matplotlib.cbook.CallbackRegistry` instance.
- The events you can connect to are :meth:`xlim_changed` and
- :meth:`ylim_changed` and the callback will be called with
- func(*ax() where *ax* is the :class:`Axes` instance.
-
+ The :class:`Axes` instance supports callbacks through a callbacks
+ attribute which is a :class:`~matplotlib.cbook.CallbackRegistry`
+ instance. The events you can connect to are 'xlim_changed' and
+ 'ylim_changed' and the callback will be called with func(*ax*)
+ where *ax* is the :class:`Axes` instance.
"""
name = "rectilinear"
@@ -2493,13 +2492,16 @@
set_title(label, fontdict=None, **kwargs):
- Set the title for the axes. See the :meth:`text` for
- information of how override and the optional args work
+ Set the title for the axes.
kwargs are Text properties:
%(Text)s
ACCEPTS: str
+
+ .. seealso::
+ :meth:`text`:
+ for information on how override and the optional args work
"""
default = {
'fontsize':rcParams['axes.titlesize'],
@@ -2527,12 +2529,15 @@
set_xlabel(xlabel, fontdict=None, **kwargs)
- Set the label for the xaxis. See the :meth:`text` docstring
- for information of how override and the optional args work.
+ Set the label for the xaxis.
Valid kwargs are Text properties:
%(Text)s
ACCEPTS: str
+
+ .. seealso::
+ :meth:`text`:
+ for information on how override and the optional args work
"""
label = self.xaxis.get_label()
@@ -2557,12 +2562,13 @@
Set the label for the yaxis
- See the :meth:`text` doctstring for information of how
- override and the optional args work
-
Valid kwargs are Text properties:
%(Text)s
ACCEPTS: str
+
+ .. seealso::
+ :meth:`text`:
+ for information on how override and the optional args work
"""
label = self.yaxis.get_label()
label.set_text(ylabel)
@@ -2711,7 +2717,9 @@
%(Line2D)s
- See :meth:`axhspan` for example plot and source code
+ .. seealso::
+ :meth:`axhspan`:
+ for example plot and source code
"""
ymin, ymax = self.get_ybound()
@@ -2765,7 +2773,9 @@
%(Line2D)s
- See :meth:`axhspan` for example plot and source code
+ .. seealso::
+ :meth:`axhspan`:
+ for example plot and source code
"""
xmin, xmax = self.get_xbound()
@@ -2863,7 +2873,9 @@
%(Polygon)s
- See :meth:`axhspan` for example plot and source code
+ .. seealso::
+ :meth:`axhspan`:
+ for example plot and source code
"""
# convert x axis units
trans = mtransforms.blended_transform_factory(
@@ -3166,12 +3178,6 @@
*x* and/or *y* can be a sequence of dates represented as float days since
0001-01-01 UTC.
- See :mod:`~matplotlib.dates` for helper functions
- :func:`~matplotlib.dates.date2num`,
- :func:`~matplotlib.dates.num2date` and
- :func:`~matplotlib.dates.drange` for help on creating the
- required floating point dates.
-
Keyword arguments:
*fmt*: string
@@ -3203,6 +3209,15 @@
%(Line2D)s
+ .. seealso::
+ :mod:`~matplotlib.dates`:
+ for helper functions
+
+ :func:`~matplotlib.dates.date2num`,
+ :func:`~matplotlib.dates.num2date` and
+ :func:`~matplotlib.dates.drange`:
+ for help on creating the required floating point
+ dates.
"""
if not self._hold: self.cla()
@@ -3302,7 +3317,9 @@
%(Line2D)s
- See :meth:`loglog` for example code and figure
+ .. seealso::
+ :meth:`loglog`:
+ For example code and figure
"""
if not self._hold: self.cla()
d = {'basex': kwargs.pop( 'basex', 10),
@@ -3345,7 +3362,9 @@
%(Line2D)s
- See :meth:`loglog` for example code and figure
+ .. seealso::
+ :meth:`loglog`:
+ For example code and figure
"""
if not self._hold: self.cla()
d = {'basey': kwargs.pop('basey', 10),
@@ -3365,7 +3384,7 @@
call signature::
acorr(x, normed=False, detrend=mlab.detrend_none, usevlines=False,
- maxlags=None, **kwargs)
+ maxlags=None, **kwargs)
Plot the autocorrelation of *x*. If *normed* = *True*,
normalize the data but the autocorrelation at 0-th lag. *x* is
@@ -3375,38 +3394,41 @@
Return value is a tuple (*lags*, *c*, *line*) where:
- - *lags* are a length 2*maxlags+1 lag vector
+ - *lags* are a length 2*maxlags+1 lag vector
- - *c* is the 2*maxlags+1 auto correlation vector
+ - *c* is the 2*maxlags+1 auto correlation vector
- - *line* is a :class:`~matplotlib.lines.Line2D` instance
- returned by :meth:`plot`
+ - *line* is a :class:`~matplotlib.lines.Line2D` instance
+ returned by :meth:`plot`
The default *linestyle* is None and the default *marker* is
``'o'``, though these can be overridden with keyword args.
- The cross correlation is performed with :func:`numpy.correlate` with
- *mode* = 2.
+ The cross correlation is performed with
+ :func:`numpy.correlate` with *mode* = 2.
If *usevlines* is *True*, :meth:`~matplotlib.axes.Axes.vlines`
rather than :meth:`~matplotlib.axes.Axes.plot` is used to draw
vertical lines from the origin to the acorr. Otherwise, the
plot style is determined by the kwargs, which are
- :class:`~matplotlib.lines.Line2D` properties. The return
- value is a tuple (*lags*, *c*, *linecol*, *b*) where
+ :class:`~matplotlib.lines.Line2D` properties.
+ *maxlags* is a positive integer detailing the number of lags
+ to show. The default value of *None* will return all
+ :math:`2 \mathrm{len}(x) - 1`` lags.
+
+ The return value is a tuple (*lags*, *c*, *linecol*, *b*)
+ where
+
- *linecol* is the
:class:`~matplotlib.collections.LineCollection`
- *b* is the *x*-axis.
- *maxlags* is a positive integer detailing the number of lags
- to show. The default value of *None* will return all
- ``(2*len(x)-1)`` lags.
+ .. seealso::
+ :meth:`~matplotlib.axes.Axes.plot` or
+ :meth:`~matplotlib.axes.Axes.vlines`:
+ For documentation on valid kwargs.
- See the respective :meth:`~matplotlib.axes.Axes.plot` or
- :meth:`~matplotlib.axes.Axes.vlines` functions for
- documentation on valid kwargs.
-
**Example:**
:func:`~matplotlib.pyplot.xcorr` above, and
@@ -4095,9 +4117,13 @@
Return value is a tuple (*markerline*, *stemlines*,
*baseline*).
- See `this document
- <http://www.mathworks.com/access/helpdesk/help/techdoc/ref/stem.html>`_
- for details and :file:`examples/pylab_examples/stem_plot.py` for a demo.
+ .. seealso::
+ `this document
+ <http://www.mathworks.com/access/helpdesk/help/techdoc/ref/stem.html>`_:
+ for details
+
+ :file:`examples/pylab_examples/stem_plot.py`:
+ for a demo
"""
remember_hold=self._hold
if not self._hold: self.cla()
@@ -5359,8 +5385,6 @@
xs, ys = poly_between(x, 0, y)
axes.fill(xs, ys, facecolor='red', alpha=0.5)
- See :file:`examples/pylab_examples/fill_between.py` for more examples.
-
The *closed* kwarg will close the polygon when *True* (default).
kwargs control the Polygon properties:
@@ -5370,6 +5394,10 @@
**Example:**
.. plot:: ../mpl_examples/pylab_examples/fill_demo.py
+
+ .. seealso::
+ :file:`examples/pylab_examples/fill_between.py`:
+ For more examples.
"""
if not self._hold: self.cla()
@@ -5805,15 +5833,16 @@
Return value is a :class:`matplotlib.collection.QuadMesh`
object.
- See :func:`~matplotlib.pyplot.pcolor` for an explanation of
- the grid orientation and the expansion of 1-D *X* and/or *Y*
- to 2-D arrays.
-
kwargs can be used to control the
:class:`matplotlib.collections.QuadMesh`
properties:
%(QuadMesh)s
+
+ .. seealso::
+ :func:`~matplotlib.pyplot.pcolor`:
+ For an explanation of the grid orientation and the
+ expansion of 1-D *X* and/or *Y* to 2-D arrays.
"""
if not self._hold: self.cla()
@@ -6519,8 +6548,6 @@
to compute :math:`P_{xy}`, with a scaling to correct for power
loss due to windowing.
- See :meth:`psd` for a description of the optional parameters.
-
Returns the tuple (*Pxy*, *freqs*). *P* is the cross spectrum
(complex valued), and :math:`10\log_{10}|P_{xy}|` is
plotted.
@@ -6536,6 +6563,10 @@
**Example:**
.. plot:: ../mpl_examples/pylab_examples/csd_demo.py
+
+ .. seealso:
+ :meth:`psd`
+ For a description of the optional parameters.
"""
if not self._hold: self.cla()
pxy, freqs = mlab.csd(x, y, NFFT, Fs, detrend, window, noverlap)
@@ -6576,8 +6607,6 @@
The return value is a tuple (*Cxy*, *f*), where *f* are the
frequencies of the coherence vector.
- See the :meth:`psd` for a description of the optional parameters.
-
kwargs are applied to the lines.
References:
@@ -6593,6 +6622,10 @@
**Example:**
.. plot:: ../mpl_examples/pylab_examples/cohere_demo.py
+
+ .. seealso:
+ :meth:`psd`
+ For a description of the optional parameters.
"""
if not self._hold: self.cla()
cxy, freqs = mlab.cohere(x, y, NFFT, Fs, detrend, window, noverlap)
@@ -6633,9 +6666,6 @@
default 0, max(bins), 0, max(freqs) where bins is the return
value from mlab.specgram
- See :meth:`~matplotlib.axes.Axes.psd` for information on the
- other keyword arguments.
-
Return value is (*Pxx*, *freqs*, *bins*, *im*):
- *bins* are the time points the spectrogram is calculated over
@@ -6646,6 +6676,10 @@
Note: If *x* is real (i.e. non-complex), only the positive
spectrum is shown. If *x* is complex, both positive and
negative parts of the spectrum are shown.
+
+ .. seealso:
+ :meth:`psd`
+ For a description of the optional parameters.
"""
if not self._hold: self.cla()
@@ -6709,7 +6743,8 @@
* *cmap*
* *alpha*
- See documentation for :func:`~matplotlib.pyplot.imshow` for details.
+ .. seealso::
+ :func:`~matplotlib.pyplot.imshow`
For controlling colors, e.g. cyan background and red marks,
use::
@@ -6722,8 +6757,6 @@
* *markersize*
* *color*
- See documentation for :func:`~matplotlib.pyplot.plot` for details.
-
Useful values for *marker* include:
* 's' square (default)
@@ -6731,6 +6764,8 @@
* '.' point
* ',' pixel
+ .. seealso::
+ :func:`~matplotlib.pyplot.plot`
"""...
[truncated message content] |
|
From: <jd...@us...> - 2008-10-16 18:32:25
|
Revision: 6224
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6224&view=rev
Author: jdh2358
Date: 2008-10-16 18:32:13 +0000 (Thu, 16 Oct 2008)
Log Message:
-----------
minor formatting tweaks
Modified Paths:
--------------
trunk/matplotlib/examples/api/logo2.py
trunk/matplotlib/lib/matplotlib/axes.py
trunk/matplotlib/lib/matplotlib/mlab.py
Modified: trunk/matplotlib/examples/api/logo2.py
===================================================================
--- trunk/matplotlib/examples/api/logo2.py 2008-10-16 17:32:39 UTC (rev 6223)
+++ trunk/matplotlib/examples/api/logo2.py 2008-10-16 18:32:13 UTC (rev 6224)
@@ -9,8 +9,8 @@
import matplotlib.mlab as mlab
from pylab import rand
-mpl.rcParams['xtick.labelsize'] = 6
-mpl.rcParams['ytick.labelsize'] = 6
+mpl.rcParams['xtick.labelsize'] = 10
+mpl.rcParams['ytick.labelsize'] = 12
mpl.rcParams['axes.edgecolor'] = 'gray'
@@ -18,7 +18,7 @@
#figcolor = '#EFEFEF'
figcolor = 'white'
dpi = 80
-fig = plt.figure(figsize=(6, 1.),dpi=dpi)
+fig = plt.figure(figsize=(6, 1.1),dpi=dpi)
fig.figurePatch.set_edgecolor(figcolor)
fig.figurePatch.set_facecolor(figcolor)
@@ -43,29 +43,40 @@
return ax
def add_matplotlib_text(ax):
- ax.text(0.975, 0.5, 'matplotlib', color='#11557c', fontsize=65,
+ ax.text(0.95, 0.5, 'matplotlib', color='#11557c', fontsize=65,
ha='right', va='center', alpha=1.0, transform=ax.transAxes)
def add_polar_bar():
- ax = fig.add_axes([0.05, 0.1, 0.2, 0.8], polar=True)
+ ax = fig.add_axes([0.025, 0.075, 0.2, 0.85], polar=True)
+
+
ax.axesPatch.set_alpha(axalpha)
+ ax.set_axisbelow(True)
N = 7
arc = 2. * np.pi
theta = np.arange(0.0, arc, arc/N)
- radii = 10 * np.array([0.2, 0.6, 1.0, 0.7, 0.4, 0.5, 0.8])
+ radii = 10 * np.array([0.2, 0.6, 0.8, 0.7, 0.4, 0.5, 0.8])
width = np.pi / 4 * np.array([0.4, 0.4, 0.6, 0.8, 0.2, 0.5, 0.3])
bars = ax.bar(theta, radii, width=width, bottom=0.0)
for r, bar in zip(radii, bars):
bar.set_facecolor(cm.jet(r/10.))
bar.set_alpha(0.6)
+ for label in ax.get_xticklabels() + ax.get_yticklabels():
+ label.set_visible(False)
+
+ for line in ax.get_ygridlines() + ax.get_xgridlines():
+ line.set_lw(0.8)
+ line.set_alpha(0.9)
+ line.set_ls('-')
+ line.set_color('0.5')
+
+ ax.set_yticks(np.arange(1, 9, 2))
+ ax.set_rmax(9)
+
if __name__ == '__main__':
main_axes = add_math_background()
add_polar_bar()
-# add_histogram()
-# add_scatter()
-# add_pcolor()
- #add_pcolor2()
add_matplotlib_text(main_axes)
fig.savefig('logo2.png', facecolor=figcolor, edgecolor=figcolor, dpi=dpi)
plt.show()
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py 2008-10-16 17:32:39 UTC (rev 6223)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2008-10-16 18:32:13 UTC (rev 6224)
@@ -3414,7 +3414,7 @@
*maxlags* is a positive integer detailing the number of lags
to show. The default value of *None* will return all
- :math:`2 \mathrm{len}(x) - 1`` lags.
+ :math:`2 \mathrm{len}(x) - 1` lags.
The return value is a tuple (*lags*, *c*, *linecol*, *b*)
where
@@ -3425,9 +3425,8 @@
- *b* is the *x*-axis.
.. seealso::
- :meth:`~matplotlib.axes.Axes.plot` or
- :meth:`~matplotlib.axes.Axes.vlines`:
- For documentation on valid kwargs.
+ :meth:`~matplotlib.axes.Axes.plot` or :meth:`~matplotlib.axes.Axes.vlines`:
+ For documentation on valid kwargs.
**Example:**
Modified: trunk/matplotlib/lib/matplotlib/mlab.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/mlab.py 2008-10-16 17:32:39 UTC (rev 6223)
+++ trunk/matplotlib/lib/matplotlib/mlab.py 2008-10-16 18:32:13 UTC (rev 6224)
@@ -1271,7 +1271,7 @@
dtype, the array will have this dtype. default: numpy.float_
.. seealso::
- See :file:`examples/load_demo.py` in the source tree:
+ See :file:`examples/pylab_examples/load_converter.py` in the source tree:
Exercises many of these options.
"""
@@ -2414,7 +2414,7 @@
files is automatic, if the filename ends in .gz
.. seealso::
- :func:`csv2rec` and :func:`rec2csv`:
+ :func:`csv2rec`:
For information about *missing* and *missingd*, which can
be used to fill in masked values into your CSV file.
"""
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2008-10-16 19:50:15
|
Revision: 6229
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6229&view=rev
Author: mdboom
Date: 2008-10-16 19:50:05 +0000 (Thu, 16 Oct 2008)
Log Message:
-----------
More docs progress.
Modified Paths:
--------------
trunk/matplotlib/doc/devel/add_new_projection.rst
trunk/matplotlib/doc/devel/outline.rst
trunk/matplotlib/lib/matplotlib/colors.py
trunk/matplotlib/lib/matplotlib/patches.py
trunk/matplotlib/lib/matplotlib/path.py
trunk/matplotlib/lib/matplotlib/projections/__init__.py
trunk/matplotlib/lib/matplotlib/projections/polar.py
trunk/matplotlib/lib/matplotlib/scale.py
trunk/matplotlib/lib/matplotlib/transforms.py
Modified: trunk/matplotlib/doc/devel/add_new_projection.rst
===================================================================
--- trunk/matplotlib/doc/devel/add_new_projection.rst 2008-10-16 19:35:12 UTC (rev 6228)
+++ trunk/matplotlib/doc/devel/add_new_projection.rst 2008-10-16 19:50:05 UTC (rev 6229)
@@ -108,3 +108,27 @@
:file:`examples/api/custom_projection_example.py`. The polar plot
functionality in :mod:`matplotlib.projections.polar` may also be of
interest.
+
+API documentation
+=================
+
+matplotlib.scale
+----------------
+
+.. automodule:: matplotlib.scale
+ :members:
+ :show-inheritance:
+
+matplotlib.projections
+----------------------
+
+.. automodule:: matplotlib.projections
+ :members:
+ :show-inheritance:
+
+matplotlib.projections.polar
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. automodule:: matplotlib.projections.polar
+ :members:
+ :show-inheritance:
Modified: trunk/matplotlib/doc/devel/outline.rst
===================================================================
--- trunk/matplotlib/doc/devel/outline.rst 2008-10-16 19:35:12 UTC (rev 6228)
+++ trunk/matplotlib/doc/devel/outline.rst 2008-10-16 19:50:05 UTC (rev 6229)
@@ -108,9 +108,9 @@
config/tconfig Darren needs conversion
config/verbose Darren needs conversion
numerix/__init__ needs conversion
-projections/__init__ needs conversion
-projections/geo needs conversion
-projections/polar needs conversion
+projections/__init__ Mike converted
+projections/geo Mike converted (not included--experimental)
+projections/polar Mike converted
afm converted
artist converted
axes converted
@@ -134,18 +134,18 @@
mathtext needs conversion
mlab needs conversion
mpl needs conversion
-patches needs conversion
-path needs conversion
-pylab needs conversion
+patches Mike converted
+path Mike converted
+pylab no docstrings
pyplot converted
quiver needs conversion
rcsetup needs conversion
-scale needs conversion
+scale Mike converted
table needs conversion
texmanager Darren needs conversion
text Mike converted
ticker Mike needs conversion
-transforms needs conversion
+transforms Mike converted
type1font needs conversion
units needs conversion
widgets needs conversion
Modified: trunk/matplotlib/lib/matplotlib/colors.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/colors.py 2008-10-16 19:35:12 UTC (rev 6228)
+++ trunk/matplotlib/lib/matplotlib/colors.py 2008-10-16 19:50:05 UTC (rev 6229)
@@ -8,14 +8,14 @@
Commands which take color arguments can use several formats to specify
the colors. For the basic builtin colors, you can use a single letter
- b : blue
- g : green
- r : red
- c : cyan
- m : magenta
- y : yellow
- k : black
- w : white
+ - b : blue
+ - g : green
+ - r : red
+ - c : cyan
+ - m : magenta
+ - y : yellow
+ - k : black
+ - w : white
Gray shades can be given as a string encoding a float in the 0-1
range, e.g.::
Modified: trunk/matplotlib/lib/matplotlib/patches.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/patches.py 2008-10-16 19:35:12 UTC (rev 6228)
+++ trunk/matplotlib/lib/matplotlib/patches.py 2008-10-16 19:50:05 UTC (rev 6229)
@@ -82,6 +82,9 @@
return inside, {}
def update_from(self, other):
+ """
+ Updates this :class:`Patch` from the properties of *other*.
+ """
artist.Artist.update_from(self, other)
self.set_edgecolor(other.get_edgecolor())
self.set_facecolor(other.get_facecolor())
@@ -94,9 +97,17 @@
self.set_alpha(other.get_alpha())
def get_extents(self):
+ """
+ Return a :class:`~matplotlib.transforms.Bbox` object defining
+ the axis-aligned extents of the :class:`Patch`.
+ """
return self.get_path().get_extents(self.get_transform())
def get_transform(self):
+ """
+ Return the :class:`~matplotlib.transforms.Transform` applied
+ to the :class:`Patch`.
+ """
return self.get_patch_transform() + artist.Artist.get_transform(self)
def get_data_transform(self):
@@ -106,22 +117,38 @@
return transforms.IdentityTransform()
def get_antialiased(self):
+ """
+ Returns True if the :class:`Patch` is to be drawn with antialiasing.
+ """
return self._antialiased
get_aa = get_antialiased
def get_edgecolor(self):
+ """
+ Return the edge color of the :class:`Patch`.
+ """
return self._edgecolor
get_ec = get_edgecolor
def get_facecolor(self):
+ """
+ Return the face color of the :class:`Patch`.
+ """
return self._facecolor
get_fc = get_facecolor
def get_linewidth(self):
+ """
+ Return the line width in points.
+ """
return self._linewidth
get_lw = get_linewidth
def get_linestyle(self):
+ """
+ Return the linestyle. Will be one of ['solid' | 'dashed' |
+ 'dashdot' | 'dotted']
+ """
return self._linestyle
get_ls = get_linestyle
@@ -133,8 +160,11 @@
"""
if aa is None: aa = mpl.rcParams['patch.antialiased']
self._antialiased = aa
- set_aa = set_antialiased
+ def set_aa(self, aa):
+ """alias for set_antialiased"""
+ return self.set_antialiased(aa)
+
def set_edgecolor(self, color):
"""
Set the patch edge color
@@ -222,15 +252,18 @@
2. Hatching is done with solid black lines of width 0.
+
+ ACCEPTS: [ '/' | '\\' | '|' | '-' | '#' | 'x' ]
"""
self._hatch = h
def get_hatch(self):
- 'return the current hatching pattern'
+ 'Return the current hatching pattern'
return self._hatch
def draw(self, renderer):
+ 'Draw the :class:`Patch` to the given *renderer*.'
if not self.get_visible(): return
#renderer.open_group('patch')
gc = renderer.new_gc()
@@ -378,8 +411,8 @@
class Rectangle(Patch):
"""
- Draw a rectangle with lower left at *xy*=(*x*, *y*) with specified
- width and height
+ Draw a rectangle with lower left at *xy* = (*x*, *y*) with
+ specified *width* and *height*.
"""
def __str__(self):
@@ -1296,13 +1329,11 @@
class BboxTransmuterBase(object):
"""
- Bbox Transmuter Base class
-
- BBoxTransmuterBase and its derivatives are used to make a fancy box
- around a given rectangle. The __call__ method returns the Path of
- the fancy box. This class is not an artist and actual drawing of the
- fancy box is done by the :class:`FancyBboxPatch` class.
-
+ :class:`BBoxTransmuterBase` and its derivatives are used to make a
+ fancy box around a given rectangle. The :meth:`__call__` method
+ returns the :class:`~matplotlib.path.Path` of the fancy box. This
+ class is not an artist and actual drawing of the fancy box is done
+ by the :class:`FancyBboxPatch` class.
"""
# The derived classes are required to be able to be initialized
@@ -1317,11 +1348,12 @@
def transmute(self, x0, y0, width, height, mutation_size):
"""
- The transmute method is a very core of the BboxTransmuter class
- and must be overriden in the subclasses. It receives the
- location and size of the rectangle, and the mutation_size, with
- which the amound padding and etc. will be scaled. It returns a
- Path instance.
+ The transmute method is a very core of the
+ :class:`BboxTransmuter` class and must be overriden in the
+ subclasses. It receives the location and size of the
+ rectangle, and the mutation_size, with which the amount of
+ padding and etc. will be scaled. It returns a
+ :class:`~matplotlib.path.Path` instance.
"""
raise NotImplementedError('Derived must override')
@@ -1501,7 +1533,8 @@
mutation_aspect=None,
**kwargs):
"""
- *xy*=lower left corner
+ *xy* = lower left corner
+
*width*, *height*
*boxstyle* describes how the fancy box will be drawn. It
@@ -1636,7 +1669,7 @@
"""
Set the transmuter object
- ACCEPTS: BboxTransmuterBase (or its derivatives) instance
+ ACCEPTS: :class:`BboxTransmuterBase` (or its derivatives) instance
"""
self._bbox_transmuter = bbox_transmuter
Modified: trunk/matplotlib/lib/matplotlib/path.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/path.py 2008-10-16 19:35:12 UTC (rev 6228)
+++ trunk/matplotlib/lib/matplotlib/path.py 2008-10-16 19:50:05 UTC (rev 6229)
@@ -15,8 +15,8 @@
class Path(object):
"""
- Path represents a series of possibly disconnected, possibly
- closed, line and curve segments.
+ :class:`Path` represents a series of possibly disconnected,
+ possibly closed, line and curve segments.
The underlying storage is made up of two parallel numpy arrays:
- *vertices*: an Nx2 float array of vertices
@@ -159,8 +159,7 @@
be simplified *only* if :attr:`should_simplify` is True, which
is determined in the constructor by this criteria:
- - No *codes* array
- - No nonfinite values
+ - No curves
- More than 128 vertices
"""
vertices = self.vertices
@@ -219,8 +218,9 @@
.. seealso::
:class:`matplotlib.transforms.TransformedPath`:
- A path class that will cache the transformed result
- and automatically update when the transform changes.
+ A specialized path class that will cache the
+ transformed result and automatically update when the
+ transform changes.
"""
return Path(transform.transform(self.vertices), self.codes)
@@ -265,8 +265,8 @@
Returns *True* if this path intersects another given path.
*filled*, when True, treats the paths as if they were filled.
- That is, if one path completely encloses the other,
- :meth:`intersects_path` will return True.
+ That is, if one path completely encloses the other,
+ :meth:`intersects_path` will return True.
"""
return path_intersects_path(self, other, filled)
Modified: trunk/matplotlib/lib/matplotlib/projections/__init__.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/projections/__init__.py 2008-10-16 19:35:12 UTC (rev 6228)
+++ trunk/matplotlib/lib/matplotlib/projections/__init__.py 2008-10-16 19:50:05 UTC (rev 6229)
@@ -3,18 +3,31 @@
from matplotlib import axes
class ProjectionRegistry(object):
+ """
+ Manages the set of projections available to the system.
+ """
def __init__(self):
self._all_projection_types = {}
def register(self, *projections):
+ """
+ Register a new set of projection(s).
+ """
for projection in projections:
name = projection.name
self._all_projection_types[name] = projection
def get_projection_class(self, name):
+ """
+ Get a projection class from its *name*.
+ """
return self._all_projection_types[name]
def get_projection_names(self):
+ """
+ Get a list of the names of all projections currently
+ registered.
+ """
names = self._all_projection_types.keys()
names.sort()
return names
@@ -31,7 +44,13 @@
def register_projection(cls):
projection_registry.register(cls)
-def get_projection_class(projection):
+def get_projection_class(projection=None):
+ """
+ Get a projection class from its name.
+
+ If *projection* is None, a standard rectilinear projection is
+ returned.
+ """
if projection is None:
projection = 'rectilinear'
@@ -41,7 +60,24 @@
raise ValueError("Unknown projection '%s'" % projection)
def projection_factory(projection, figure, rect, **kwargs):
+ """
+ Get a new projection instance.
+
+ *projection* is a projection name.
+
+ *figure* is a figure to add the axes to.
+
+ *rect* is a :class:`~matplotlib.transforms.Bbox` object specifying
+ the location of the axes within the figure.
+
+ Any other kwargs are passed along to the specific projection
+ constructor being used.
+ """
+
return get_projection_class(projection)(figure, rect, **kwargs)
def get_projection_names():
+ """
+ Get a list of acceptable projection names.
+ """
return projection_registry.get_projection_names()
Modified: trunk/matplotlib/lib/matplotlib/projections/polar.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/projections/polar.py 2008-10-16 19:35:12 UTC (rev 6228)
+++ trunk/matplotlib/lib/matplotlib/projections/polar.py 2008-10-16 19:50:05 UTC (rev 6229)
@@ -15,7 +15,7 @@
class PolarAxes(Axes):
"""
- A polar graph projection, where the input dimensions are theta, r.
+ A polar graph projection, where the input dimensions are *theta*, *r*.
Theta starts pointing east and goes anti-clockwise.
"""
@@ -23,9 +23,10 @@
class PolarTransform(Transform):
"""
- The base polar transform. This handles projection theta and r into
- Cartesian coordinate space, but does not perform the ultimate affine
- transformation into the correct position.
+ The base polar transform. This handles projection *theta* and
+ *r* into Cartesian coordinate space *x* and *y*, but does not
+ perform the ultimate affine transformation into the correct
+ position.
"""
input_dims = 2
output_dims = 2
@@ -77,9 +78,10 @@
that maximum radius rests on the edge of the axes circle.
"""
def __init__(self, scale_transform, limits):
- """
- limits is the view limit of the data. The only part of
+ u"""
+ *limits* is the view limit of the data. The only part of
its bounds that is used is ymax (for the radius maximum).
+ The theta range is always fixed to (0, 2\u03c0).
"""
Affine2DBase.__init__(self)
self._scale_transform = scale_transform
@@ -103,7 +105,7 @@
class InvertedPolarTransform(Transform):
"""
The inverse of the polar transform, mapping Cartesian
- coordinate space back to t and r.
+ coordinate space *x* and *y* back to *theta* and *r*.
"""
input_dims = 2
output_dims = 2
@@ -127,10 +129,11 @@
inverted.__doc__ = Transform.inverted.__doc__
class ThetaFormatter(Formatter):
+ u"""
+ Used to format the *theta* tick labels. Converts the
+ native unit of radians into degrees and adds a degree symbol
+ (\u00b0).
"""
- Used to format the theta tick labels. Converts the native
- unit of radians into degrees and adds a degree symbol.
- """
def __call__(self, x, pos=None):
# \u00b0 : degree symbol
return u"%d\u00b0" % ((x / npy.pi) * 180.0)
@@ -140,8 +143,9 @@
Used to locate radius ticks.
Ensures that all ticks are strictly positive. For all other
- tasks, it delegates to the base Locator (which may be
- different depending on the scale of the r-axis.
+ tasks, it delegates to the base
+ :class:`~matplotlib.ticker.Locator` (which may be different
+ depending on the scale of the *r*-axis.
"""
def __init__(self, base):
self.base = base
@@ -290,24 +294,26 @@
**kwargs):
"""
Set the angles at which to place the theta grids (these
- gridlines are equal along the theta dimension). angles is in
- degrees
+ gridlines are equal along the theta dimension). *angles* is in
+ degrees.
- labels, if not None, is a len(angles) list of strings of the
- labels to use at each angle.
+ *labels*, if not None, is a ``len(angles)`` list of strings of
+ the labels to use at each angle.
- if labels is None, the labels with be fmt%%angle
+ If *labels* is None, the labels will be ``fmt %% angle``
- frac is the fraction of the polar axes radius at which to
- place the label (1 is the edge).Eg 1.05 isd outside the axes
- and 0.95 is inside the axes
+ *frac* is the fraction of the polar axes radius at which to
+ place the label (1 is the edge). Eg. 1.05 is outside the axes
+ and 0.95 is inside the axes.
- Return value is a list of lines, labels where the lines are
- lines.Line2D instances and the labels are Text
- instances:
+ Return value is a list of tuples (*line*, *label*), where
+ *line* is :class:`~matplotlib.lines.Line2D` instances and the
+ *label* is :class:`~matplotlib.text.Text` instances.
- kwargs are optional text properties for the labels
+ kwargs are optional text properties for the labels:
+
%(Text)s
+
ACCEPTS: sequence of floats
"""
angles = npy.asarray(angles, npy.float_)
@@ -324,23 +330,25 @@
def set_rgrids(self, radii, labels=None, angle=None, rpad=None, **kwargs):
"""
- set the radial locations and labels of the r grids
+ Set the radial locations and labels of the *r* grids.
- The labels will appear at radial distances radii at angle
+ The labels will appear at radial distances *radii* at the
+ given *angle* in degrees.
- labels, if not None, is a len(radii) list of strings of the
- labels to use at each angle.
+ *labels*, if not None, is a ``len(radii)`` list of strings of the
+ labels to use at each radius.
- if labels is None, the self.rformatter will be used
+ If *labels* is None, the built-in formatter will be used.
- rpad is a fraction of the max of radii which will pad each of
+ *rpad* is a fraction of the max of *radii* which will pad each of
the radial labels in the radial direction.
- Return value is a list of lines, labels where the lines are
- lines.Line2D instances and the labels are text.Text
- instances
+ Return value is a list of tuples (*line*, *label*), where
+ *line* is :class:`~matplotlib.lines.Line2D` instances and the
+ *label* is :class:`~matplotlib.text.Text` instances.
- kwargs control the rgrid Text label properties:
+ kwargs are optional text properties for the labels:
+
%(Text)s
ACCEPTS: sequence of floats
@@ -375,7 +383,10 @@
self.viewLim.intervalx = (0.0, npy.pi * 2.0)
def format_coord(self, theta, r):
- 'return a format string formatting the coordinate'
+ """
+ Return a format string formatting the coordinate using Unicode
+ characters.
+ """
theta /= math.pi
# \u03b8: lower-case theta
# \u03c0: lower-case pi
Modified: trunk/matplotlib/lib/matplotlib/scale.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/scale.py 2008-10-16 19:35:12 UTC (rev 6228)
+++ trunk/matplotlib/lib/matplotlib/scale.py 2008-10-16 19:50:05 UTC (rev 6229)
@@ -9,50 +9,99 @@
from transforms import Transform, IdentityTransform
class ScaleBase(object):
+ """
+ The base class for all scales.
+
+ Scales are separable transformations, working on a single dimension.
+
+ Any subclasses will want to override:
+
+ - :attr:`name`
+ - :meth:`get_transform`
+
+ And optionally:
+ - :meth:`set_default_locators_and_formatters`
+ - :meth:`limit_range_for_scale`
+ """
def get_transform(self):
"""
- Return the transform object associated with this scale.
+ Return the :class:`~matplotlib.transforms.Transform` object
+ associated with this scale.
"""
raise NotImplementedError
def set_default_locators_and_formatters(self, axis):
"""
- Set the locators and formatters that go with this scale.
+ Set the :class:`~matplotlib.ticker.Locator` and
+ :class:`~matplotlib.ticker.Formatter` objects on the given
+ axis to match this scale.
"""
raise NotImplementedError
def limit_range_for_scale(self, vmin, vmax, minpos):
"""
- Returns the range vmin, vmax, limited to the domain supported
- by this scale.
+ Returns the range *vmin*, *vmax*, possibly limited to the
+ domain supported by this scale.
+
+ *minpos* should be the minimum positive value in the data.
+ This is used by log scales to determine a minimum value.
"""
return vmin, vmax
class LinearScale(ScaleBase):
+ """
+ The default linear scale.
+ """
+
name = 'linear'
def __init__(self, axis, **kwargs):
- """
- """
pass
def set_default_locators_and_formatters(self, axis):
+ """
+ Set the locators and formatters to reasonable defaults for
+ linear scaling.
+ """
axis.set_major_locator(AutoLocator())
axis.set_major_formatter(ScalarFormatter())
axis.set_minor_locator(NullLocator())
axis.set_minor_formatter(NullFormatter())
def get_transform(self):
+ """
+ The transform for linear scaling is just the
+ :class:`~matplotlib.transforms.IdentityTransform`.
+ """
return IdentityTransform()
def _mask_non_positives(a):
+ """
+ Return a Numpy masked array where all non-positive values are
+ masked. If there are no non-positive values, the original array
+ is returned.
+ """
mask = a <= 0.0
if mask.any():
return ma.MaskedArray(a, mask=mask)
return a
class LogScale(ScaleBase):
+ """
+ A standard logarithmic scale. Care is taken so non-positive
+ values are not plotted.
+
+ For computational efficiency (to push as much as possible to Numpy
+ C code in the common cases), this scale provides different
+ transforms depending on the base of the logarithm:
+
+ - base 10 (:class:`Log10Transform`)
+ - base 2 (:class:`Log2Transform`)
+ - base e (:class:`NaturalLogTransform`)
+ - arbitrary base (:class:`LogTransform`)
+ """
+
name = 'log'
class Log10Transform(Transform):
@@ -203,15 +252,26 @@
self.subs = subs
def set_default_locators_and_formatters(self, axis):
+ """
+ Set the locators and formatters to specialized versions for
+ log scaling.
+ """
axis.set_major_locator(LogLocator(self.base))
axis.set_major_formatter(LogFormatterMathtext(self.base))
axis.set_minor_locator(LogLocator(self.base, self.subs))
axis.set_minor_formatter(NullFormatter())
def get_transform(self):
+ """
+ Return a :class:`~matplotlib.transforms.Transform` instance
+ appropriate for the given logarithm base.
+ """
return self._transform
def limit_range_for_scale(self, vmin, vmax, minpos):
+ """
+ Limit the domain to positive values.
+ """
return (vmin <= 0.0 and minpos or vmin,
vmax <= 0.0 and minpos or vmax)
@@ -221,10 +281,10 @@
The symmetrical logarithmic scale is logarithmic in both the
positive and negative directions from the origin.
- Since the values close to zero tend toward infinity, there is
- usually need to have a range around zero that is linear. The
- parameter "linthresh" allows the user to specify the size of this
- range (-linthresh, linthresh).
+ Since the values close to zero tend toward infinity, there is a
+ need to have a range around zero that is linear. The parameter
+ *linthresh* allows the user to specify the size of this range
+ (-*linthresh*, *linthresh*).
"""
name = 'symlog'
@@ -310,12 +370,19 @@
self.subs = subs
def set_default_locators_and_formatters(self, axis):
+ """
+ Set the locators and formatters to specialized versions for
+ symmetrical log scaling.
+ """
axis.set_major_locator(SymmetricalLogLocator(self.get_transform()))
axis.set_major_formatter(LogFormatterMathtext(self.base))
axis.set_minor_locator(SymmetricalLogLocator(self.get_transform(), self.subs))
axis.set_minor_formatter(NullFormatter())
def get_transform(self):
+ """
+ Return a :class:`SymmetricalLogTransform` instance.
+ """
return self._transform
@@ -325,7 +392,17 @@
'log' : LogScale,
'symlog' : SymmetricalLogScale
}
+def get_scale_names():
+ names = _scale_mapping.keys()
+ names.sort()
+ return names
+
def scale_factory(scale, axis, **kwargs):
+ """
+ Return a scale class by name.
+
+ ACCEPTS: [ %s ]
+ """
scale = scale.lower()
if scale is None:
scale = 'linear'
@@ -334,19 +411,20 @@
raise ValueError("Unknown scale type '%s'" % scale)
return _scale_mapping[scale](axis, **kwargs)
+scale_factory.__doc__ = scale_factory.__doc__ % " | ".join(get_scale_names())
def register_scale(scale_class):
"""
Register a new kind of scale.
+
+ *scale_class* must be a subclass of :class:`ScaleBase`.
"""
_scale_mapping[scale_class.name] = scale_class
-def get_scale_names():
- names = _scale_mapping.keys()
- names.sort()
- return names
-
def get_scale_docs():
+ """
+ Helper function for generating docstrings related to scales.
+ """
docs = []
for name in get_scale_names():
scale_class = _scale_mapping[name]
Modified: trunk/matplotlib/lib/matplotlib/transforms.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/transforms.py 2008-10-16 19:35:12 UTC (rev 6228)
+++ trunk/matplotlib/lib/matplotlib/transforms.py 2008-10-16 19:50:05 UTC (rev 6229)
@@ -79,7 +79,7 @@
def __init__(self):
"""
- Creates a new TransformNode.
+ Creates a new :class:`TransformNode`.
"""
# Parents are stored in a WeakKeyDictionary, so that if the
# parents are deleted, references from the children won't keep
@@ -98,8 +98,8 @@
def invalidate(self):
"""
- Invalidate this transform node and all of its ancestors.
- Should be called any time the transform changes.
+ Invalidate this :class:`TransformNode` and all of its
+ ancestors. Should be called any time the transform changes.
"""
# If we are an affine transform being changed, we can set the
# flag to INVALID_AFFINE_ONLY
@@ -145,8 +145,8 @@
"""
Returns a frozen copy of this transform node. The frozen copy
will not update when its children change. Useful for storing
- a previously known state of a transform where copy.deepcopy()
- might normally be used.
+ a previously known state of a transform where
+ ``copy.deepcopy()`` might normally be used.
"""
return self
@@ -162,7 +162,7 @@
Affine transforms are marked in blue. Bounding boxes are
marked in yellow.
- fobj: A Python file-like object
+ *fobj*: A Python file-like object
"""
seen = set()
@@ -242,8 +242,8 @@
def is_unit(self):
"""
- Returns True if the Bbox is the unit bounding box from (0, 0)
- to (1, 1).
+ Returns True if the :class:`Bbox` is the unit bounding box
+ from (0, 0) to (1, 1).
"""
return list(self.get_points().flatten()) == [0., 0., 1., 1.]
@@ -370,7 +370,7 @@
def containsx(self, x):
"""
- Returns True if x is between or equal to :attr:`x0` and
+ Returns True if *x* is between or equal to :attr:`x0` and
:attr:`x1`.
"""
x0, x1 = self.intervalx
@@ -380,7 +380,7 @@
def containsy(self, y):
"""
- Returns True if y is between or equal to :attr:`y0` and
+ Returns True if *y* is between or equal to :attr:`y0` and
...
[truncated message content] |
|
From: <jd...@us...> - 2008-10-17 15:35:15
|
Revision: 6241
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6241&view=rev
Author: jdh2358
Date: 2008-10-17 15:35:05 +0000 (Fri, 17 Oct 2008)
Log Message:
-----------
added joshuas movie demo
Modified Paths:
--------------
trunk/matplotlib/doc/faq/howto_faq.rst
trunk/matplotlib/doc/faq/installing_faq.rst
Added Paths:
-----------
trunk/matplotlib/examples/animation/animation_blit_gtk.py
trunk/matplotlib/examples/animation/movie_demo.py
Removed Paths:
-------------
trunk/matplotlib/examples/animation/animation_blit.py
Modified: trunk/matplotlib/doc/faq/howto_faq.rst
===================================================================
--- trunk/matplotlib/doc/faq/howto_faq.rst 2008-10-17 14:31:38 UTC (rev 6240)
+++ trunk/matplotlib/doc/faq/howto_faq.rst 2008-10-17 15:35:05 UTC (rev 6241)
@@ -299,7 +299,7 @@
for a single point use :func:`~matplotlib.nxutils.pnpoly` and for an
array of points use :func:`~matplotlib.nxutils.points_inside_poly`.
For a discussion of the implementation see `pnpoly
-<http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html>`_.
+<http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html>`_.
.. sourcecode:: ipython
@@ -334,5 +334,140 @@
Out[32]: array([False, False, False, False, False, False, False, True, False, True], dtype=bool)
.. htmlonly::
-
+
For a complete example, see :ref:`event_handling-lasso_demo`.
+
+
+.. _how-to-submit-patch:
+
+How do I submit a patch?
+========================
+
+First obtain a copy of matplotlib svn (see :ref:`install-svn`) and
+make your changes to the matplotlib source code or documentation and
+apply a `svn diff`. If it is feasible, do your diff from the top
+level directory, the one that contains :file:`setup.py`. Eg,::
+
+ > cd /path/to/matplotlib/source
+ > svn diff > mypatch.diff
+
+and then post your patch to the `matplotlib-devel
+<http://sourceforge.net/mail/?group_id=80706>`_ mailing list. If you
+do not get a response within 24 hours, post your patch to the
+sourceforge patch `tracker
+<http://sourceforge.net/tracker2/?atid=560722&group_id=80706&func=browse>`_,
+and follow up on the mailing list with a link to the sourceforge patch
+submissions. If you still do not hear anything within a week (this
+shouldn't happen!), send us a kind and gentle reminder on the mailing
+list.
+
+If you have made lots of local changes and do not want to a diff
+against the entire tree, but rather against a single directory or
+file, that is fine, but we do prefer svn diffs against HEAD.
+
+You should check out the guide to developing matplotlib to make sure
+your patch abides by our coding conventions
+:ref:`developers-guide-index`.
+
+
+.. _howto-click-maps:
+
+Clickable images for HTML
+=========================
+
+Andrew Dalke of `Dalke Scientific <http://www.dalkescientific.com>`_
+has written a nice `article
+<http://www.dalkescientific.com/writings/diary/archive/2005/04/24/interactive_html.html>`_
+on how to make html click maps with matplotlib agg PNGs. We would
+also like to add this functionality to SVG and add a SWF backend to
+support these kind of images. If you are interested in contributing
+to these efforts that would be great.
+
+.. _howto-set-zorder:
+
+How do I control the depth of plot elements?
+=============================================
+
+Within an axes, the order that the various lines, markers, text,
+collections, etc appear is determined by the
+:meth:`matplotlib.artist.Artist.set_zorder` property. The default
+order is patches, lines, text, with collections of lines and
+collections of patches appearing at the same level as regular lines
+and patches, respectively::
+
+ line, = ax.plot(x, y, zorder=10)
+
+
+
+.. htmlonly::
+
+ See :ref:`pylab_examples-zorder_demo` for a complete example.
+
+You can also use the Axes property
+:meth:`matplotlib.axes.Axes.set_axisbelow` to control whether the grid
+lines are placed above or below your other plot elements.
+
+.. _howto-axis-equal:
+
+How to I make the aspect ratio for plots equal?
+===============================================
+
+The Axes property :meth:`matplotlib.axes.Axes.set_aspect` controls the
+aspect ratio of the axes. You can set it to be 'auto', 'equal', or
+some ratio which controls the ratio::
+
+ ax = fig.add_subplot(111, aspect='equal')
+
+
+
+.. htmlonly::
+
+ See :ref:`pylab_examples-equal_aspect_ratio` for a complete example.
+
+
+.. _howto-movie:
+
+How do I make a movie?
+======================
+
+
+If you want to take an animated plot and turn it into a movie, the
+best approach is to save a series of image files (eg PNG) and use an
+external tool to convert them to a movie. You can use ` mencoder
+<http://www.mplayerhq.hu/DOCS/HTML/en/mencoder.html>`_,
+which is part of the `mplayer <http://www.mplayerhq.hu>`_ suite
+for this::
+
+
+ #fps (frames per second) controls the play speed
+ mencoder 'mf://*.png' -mf type=png:fps=10 -ovc \\
+ lavc -lavcopts vcodec=wmv2 -oac copy -o animation.avi
+
+The swiss army knife of image tools, ImageMagick's `convert
+<http://www.imagemagick.org/script/convert.php>`_ works for this as
+well.<p>
+
+Here is a simple example script that saves some PNGs, makes them into
+a movie, and then cleans up::
+
+ import os, sys
+ import matplotlib.pyplot as plt
+
+ files = []
+ fig = plt.figure(figsize=(5,5))
+ ax = fig.add_subplot(111)
+ for i in range(50): # 50 frames
+ ax.cla()
+ ax.imshow(rand(5,5), interpolation='nearest')
+ fname = '_tmp%03d.png'%i
+ print 'Saving frame', fname
+ fig.savefig(fname)
+ files.append(fname)
+
+ print 'Making movie animation.mpg - this make take a while'
+ os.system("mencoder 'mf://_tmp*.png' -mf type=png:fps=10 \\
+ -ovc lavc -lavcopts vcodec=wmv2 -oac copy -o animation.mpg")
+
+.. htmlonly::
+
+ See :ref:`animation-movie_demo` for a complete example.
Modified: trunk/matplotlib/doc/faq/installing_faq.rst
===================================================================
--- trunk/matplotlib/doc/faq/installing_faq.rst 2008-10-17 14:31:38 UTC (rev 6240)
+++ trunk/matplotlib/doc/faq/installing_faq.rst 2008-10-17 15:35:05 UTC (rev 6241)
@@ -105,6 +105,8 @@
> cd matplotlib
> python setup.py install
+
+
Backends
========
Deleted: trunk/matplotlib/examples/animation/animation_blit.py
===================================================================
--- trunk/matplotlib/examples/animation/animation_blit.py 2008-10-17 14:31:38 UTC (rev 6240)
+++ trunk/matplotlib/examples/animation/animation_blit.py 2008-10-17 15:35:05 UTC (rev 6241)
@@ -1,57 +0,0 @@
-#!/usr/bin/env python
-
-# For detailed comments on animation and the techniques used here, see
-# the wiki entry
-# http://www.scipy.org/wikis/topical_software/MatplotlibAnimation
-import sys
-import time
-
-import gtk, gobject
-
-import matplotlib
-matplotlib.use('GTKAgg')
-import numpy as npy
-import pylab as p
-
-
-ax = p.subplot(111)
-canvas = ax.figure.canvas
-
-p.subplots_adjust(left=0.3, bottom=0.3) # check for flipy bugs
-p.grid() # to ensure proper background restore
-
-# create the initial line
-x = npy.arange(0,2*npy.pi,0.01)
-line, = p.plot(x, npy.sin(x), animated=True, lw=2)
-
-# for profiling
-tstart = time.time()
-
-def update_line(*args):
- if update_line.background is None:
- update_line.background = canvas.copy_from_bbox(ax.bbox)
-
- # restore the clean slate background
- canvas.restore_region(update_line.background)
- # update the data
- line.set_ydata(npy.sin(x+update_line.cnt/10.0))
- # just draw the animated artist
- try:
- ax.draw_artist(line)
- except AssertionError:
- return
- # just redraw the axes rectangle
- canvas.blit(ax.bbox)
-
- if update_line.cnt==1000:
- # print the timing info and quit
- print 'FPS:' , 1000/(time.time()-tstart)
- sys.exit()
-
- update_line.cnt += 1
- return True
-
-update_line.cnt = 0
-update_line.background = None
-gobject.idle_add(update_line)
-p.show()
Copied: trunk/matplotlib/examples/animation/animation_blit_gtk.py (from rev 6240, trunk/matplotlib/examples/animation/animation_blit.py)
===================================================================
--- trunk/matplotlib/examples/animation/animation_blit_gtk.py (rev 0)
+++ trunk/matplotlib/examples/animation/animation_blit_gtk.py 2008-10-17 15:35:05 UTC (rev 6241)
@@ -0,0 +1,68 @@
+#!/usr/bin/env python
+
+# For detailed comments on animation and the techniques used here, see
+# the wiki entry
+# http://www.scipy.org/wikis/topical_software/MatplotlibAnimation
+import time
+
+import gtk, gobject
+
+import matplotlib
+matplotlib.use('GTKAgg')
+
+import numpy as np
+import matplotlib.pyplot as plt
+
+
+fig = plt.figure()
+ax = fig.add_subplot(111)
+canvas = fig.canvas
+
+fig.subplots_adjust(left=0.3, bottom=0.3) # check for flipy bugs
+ax.grid() # to ensure proper background restore
+
+# create the initial line
+x = np.arange(0,2*np.pi,0.01)
+line, = ax.plot(x, np.sin(x), animated=True, lw=2)
+canvas.draw()
+
+# for profiling
+tstart = time.time()
+
+def update_line(*args):
+ print 'you are here', update_line.cnt
+ if update_line.background is None:
+ update_line.background = canvas.copy_from_bbox(ax.bbox)
+
+ # restore the clean slate background
+ canvas.restore_region(update_line.background)
+ # update the data
+ line.set_ydata(np.sin(x+update_line.cnt/10.0))
+ # just draw the animated artist
+ ax.draw_artist(line)
+
+ # just redraw the axes rectangle
+ canvas.blit(ax.bbox)
+
+ if update_line.cnt==1000:
+ # print the timing info and quit
+ print 'FPS:' , 1000/(time.time()-tstart)
+ gtk.mainquit()
+ raise SystemExit
+
+ update_line.cnt += 1
+ return True
+
+update_line.cnt = 0
+update_line.background = None
+
+
+def start_anim(event):
+ gobject.idle_add(update_line)
+ canvas.mpl_disconnect(start_anim.cid)
+
+start_anim.cid = canvas.mpl_connect('draw_event', start_anim)
+
+
+
+plt.show()
Added: trunk/matplotlib/examples/animation/movie_demo.py
===================================================================
--- trunk/matplotlib/examples/animation/movie_demo.py (rev 0)
+++ trunk/matplotlib/examples/animation/movie_demo.py 2008-10-17 15:35:05 UTC (rev 6241)
@@ -0,0 +1,140 @@
+#!/usr/bin/python
+#
+# Josh Lifton 2004
+#
+# Permission is hereby granted to use and abuse this document
+# so long as proper attribution is given.
+#
+# This Python script demonstrates how to use the numarray package
+# to generate and handle large arrays of data and how to use the
+# matplotlib package to generate plots from the data and then save
+# those plots as images. These images are then stitched together
+# by Mencoder to create a movie of the plotted data. This script
+# is for demonstration purposes only and is not intended to be
+# for general use. In particular, you will likely need to modify
+# the script to suit your own needs.
+#
+
+
+from matplotlib.matlab import * # For plotting graphs.
+import os # For issuing commands to the OS.
+import sys # For determining the Python version.
+
+#
+# Print the version information for the machine, OS,
+# Python interpreter, and matplotlib. The version of
+# Mencoder is printed when it is called.
+#
+# This script is known to have worked for:
+#
+# OS version: ('Linux', 'flux-capacitor', '2.4.26', '#1 SMP Sa Apr 17 19:33:42 CEST 2004', 'i686')
+# Python version: 2.3.4 (#2, May 29 2004, 03:31:27) [GCC 3.3.3 (Debian 20040417)]
+# matplotlib version: 0.61.0
+# MEncoder version:
+# MEncoder 1.0pre4-3.3.3 (C) 2000-2004 MPlayer Team
+# CPU: Intel Celeron 2/Pentium III Coppermine,Geyserville 996.1 MHz (Family: 6, Stepping: 10)
+# Detected cache-line size is 32 bytes
+# CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 0
+# Compiled for x86 CPU with extensions: MMX MMX2 SSE
+#
+print 'Executing on', os.uname()
+print 'Python version', sys.version
+print 'matplotlib version', matplotlib.__version__
+
+
+
+#
+# First, let's create some data to work with. In this example
+# we'll use a normalized Gaussian waveform whose mean and
+# standard deviation both increase linearly with time. Such a
+# waveform can be thought of as a propagating system that loses
+# coherence over time, as might happen to the probability
+# distribution of a clock subjected to independent, identically
+# distributed Gaussian noise at each time step.
+#
+
+print 'Initializing data set...' # Let the user know what's happening.
+
+# Initialize variables needed to create and store the example data set.
+numberOfTimeSteps = 100 # Number of frames we want in the movie.
+x = arange(-10,10,0.01) # Values to be plotted on the x-axis.
+mean = -6 # Initial mean of the Gaussian.
+stddev = 0.2 # Initial standard deviation.
+meaninc = 0.1 # Mean increment.
+stddevinc = 0.1 # Standard deviation increment.
+
+# Create an array of zeros and fill it with the example data.
+y = zeros((numberOfTimeSteps,len(x)), Float64)
+for i in range(numberOfTimeSteps) :
+ y[i] = (1/sqrt(2*pi*stddev))*exp(-((x-mean)**2)/(2*stddev))
+ mean = mean + meaninc
+ stddev = stddev + stddevinc
+
+print 'Done.' # Let the user know what's happening.
+
+#
+# Now that we have an example data set (x,y) to work with, we can
+# start graphing it and saving the images.
+#
+
+for i in range(len(y)) :
+ #
+ # The next four lines are just like Matlab.
+ #
+ plot(x,y[i],'b.')
+ axis((x[0],x[-1],-0.25,1))
+ xlabel('time (ms)')
+ ylabel('probability density function')
+
+ #
+ # Notice the use of LaTeX-like markup.
+ #
+ title(r'$\cal{N}(\mu, \sigma^2)$', fontsize=20)
+
+ #
+ # The file name indicates how the image will be saved and the
+ # order it will appear in the movie. If you actually wanted each
+ # graph to be displayed on the screen, you would include commands
+ # such as show() and draw() here. See the matplotlib
+ # documentation for details. In this case, we are saving the
+ # images directly to a file without displaying them.
+ #
+ filename = str('%03d' % i) + '.png'
+ savefig(filename, dpi=100)
+
+ #
+ # Let the user know what's happening.
+ #
+ print 'Wrote file', filename
+
+ #
+ # Clear the figure to make way for the next image.
+ #
+ clf()
+
+#
+# Now that we have graphed images of the dataset, we will stitch them
+# together using Mencoder to create a movie. Each image will become
+# a single frame in the movie.
+#
+# We want to use Python to make what would normally be a command line
+# call to Mencoder. Specifically, the command line call we want to
+# emulate is (without the initial '#'):
+# mencoder mf://*.png -mf type=png:w=800:h=600:fps=25 -ovc lavc -lavcopts vcodec=mpeg4 -oac copy -o output.avi
+# See the MPlayer and Mencoder documentation for details.
+#
+
+command = ('mencoder',
+ 'mf://*.png',
+ '-mf',
+ 'type=png:w=800:h=600:fps=25',
+ '-ovc',
+ 'lavc',
+ '-lavcopts',
+ 'vcodec=mpeg4',
+ '-oac',
+ 'copy',
+ '-o',
+ 'output.avi')
+
+os.spawnvp(os.P_WAIT, 'mencoder', command)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2008-10-17 16:03:05
|
Revision: 6242
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6242&view=rev
Author: jdh2358
Date: 2008-10-17 16:02:52 +0000 (Fri, 17 Oct 2008)
Log Message:
-----------
updates to the FAQ
Modified Paths:
--------------
trunk/matplotlib/doc/faq/howto_faq.rst
trunk/matplotlib/examples/pylab_examples/two_scales.py
Modified: trunk/matplotlib/doc/faq/howto_faq.rst
===================================================================
--- trunk/matplotlib/doc/faq/howto_faq.rst 2008-10-17 15:35:05 UTC (rev 6241)
+++ trunk/matplotlib/doc/faq/howto_faq.rst 2008-10-17 16:02:52 UTC (rev 6242)
@@ -470,4 +470,127 @@
.. htmlonly::
- See :ref:`animation-movie_demo` for a complete example.
+ Josh Lifton provided this example :ref:`animation-movie_demo`, which is possibly dated since it was written in 2004.
+
+
+.. _howto-twoscale:
+
+Can I have multiple y-axis scales?
+==================================
+
+A frequent request is to have two scales for the left and right
+y-axis, which is possible using :func:`~matplotlib.pyplot.twinx` (more
+than two scales are not currently supported, though it is on the wishq
+list). This works pretty well, though there are some quirks when you
+are trying to interactively pan and zoom, since both scales do not get
+the signals.
+
+The approach :func:`~matplotlib.pyplot.twinx` (and its sister
+:func:`~matplotlib.pyplot.twiny`) uses is to use *2 different axes*,
+turning the axes rectangular frame off on the 2nd axes to keep it from
+obscuring the first, and manually setting the tick locs and labels as
+desired. You can use separate matplotlib.ticker formatters and
+locators as desired since the two axes are independent::
+
+ import numpy as np
+ import matplotlib.pyplot as plt
+
+ fig = plt.figure()
+ ax1 = fig.add_subplot(111)
+ t = np.arange(0.01, 10.0, 0.01)
+ s1 = np.exp(t)
+ ax1.plot(t, s1, 'b-')
+ ax1.set_xlabel('time (s)')
+ ax1.set_ylabel('exp')
+
+ ax2 = ax1.twinx()
+ s2 = np.sin(2*np.pi*t)
+ ax2.plot(t, s2, 'r.')
+ ax2.set_ylabel('sin')
+ plt.show()
+
+
+.. htmlonly::
+
+ See :ref:`api-two_scales` for a complete example
+
+.. _howto-batchmode:
+
+Can I just generate images without having a window popup?
+=====================================================
+
+The easiest way to do this is use an image backend (see
+:ref:`what-is-a-backend`) such as Agg (for PNGs), PDF, SVG or PS. In
+your figure generating script, just place call
+:func:`matplotlib.use` directive before importing pylab or
+pyplot::
+
+ import matplotlib
+ matplotlib.use('Agg')
+ import matplotlib.pyplot as plt
+ plt.plot([1,2,3])
+ plt.savefig('myfig')
+
+
+.. seealso::
+ :ref:`howto-webapp`
+
+ ('SHOW',
+ "What's up with 'show'? Do I have to use it?",
+ """
+
+.. _howto-show
+
+How should I use :func:`~matplotlib.pyplot.show`?
+=================================================
+
+The user interface backends need to start the GUI mainloop, and this
+is what :func:`~matplotlib.pyplot.show` does. It tells matplotlib to
+raise all of the figure windows and start the mainloop. Because the
+mainloop is blocking, you should only call this once per script, at
+the end. If you are using matplotlib to generate images only and do
+not want a user interface window, you can skip it (see
+:ref:`howto-batch` and :ref:`what-is-a-backend`).
+
+
+Because it is expensive to draw, matplotlib does not want to redrawing the figure
+many times in a script such as the following::
+
+ plot([1,2,3]) # draw here ?
+ xlabel('time') # and here ?
+ ylabel('volts') # and here ?
+ title('a simple plot') # and here ?
+ show()
+
+
+It is *possible* to force matplotlib to draw after every command,
+which is what you usually want when working interactively at the
+python console, but in a script you want to defer all drawing until
+the script has executed (see :ref:`mpl-shell`). This is especially
+important for complex figures that take some time to draw.
+:func:`~matplotlib.pyplot.show` is designed to tell matplotlib that
+you're all done issuing commands and you want to draw the figure now.
+
+.. note::
+
+ :func:`~matplotlib.pyplot.show` should be called at most once per
+ script and it should be the last line of your script. At that
+ point, the GUI takes control of the interpreter. If you want to
+ force a figure draw, use :func:`~matplotlib.pyplot.draw` instead.
+
+Many users are frustrated by show because they want it to be a
+blocking call that raises the figure, pauses the script until the
+figure is closed, and then allows the script to continue running until
+the next figure is created and the next show is made. Something like
+this::
+
+ # WARNING : illustrating how NOT to use show
+ for i in range(10):
+ # make figure i
+ show()
+
+This is not what show does and unfortunately, because doing blocking
+calls across user interfaces can be tricky, is currently unsupported,
+though we have made some pregress towards supporting blocking events.
+
+
Modified: trunk/matplotlib/examples/pylab_examples/two_scales.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/two_scales.py 2008-10-17 15:35:05 UTC (rev 6241)
+++ trunk/matplotlib/examples/pylab_examples/two_scales.py 2008-10-17 16:02:52 UTC (rev 6242)
@@ -19,20 +19,22 @@
"""
-from pylab import *
+import numpy as np
+import matplotlib.pyplot as plt
-ax1 = subplot(111)
-t = arange(0.01, 10.0, 0.01)
-s1 = exp(t)
-plot(t, s1, 'b-')
-xlabel('time (s)')
-ylabel('exp')
+fig = plt.figure()
+ax1 = fig.add_subplot(111)
+t = np.arange(0.01, 10.0, 0.01)
+s1 = np.exp(t)
+ax1.plot(t, s1, 'b-')
+ax1.set_xlabel('time (s)')
+ax1.set_ylabel('exp')
# turn off the 2nd axes rectangle with frameon kwarg
-ax2 = twinx()
-s2 = sin(2*pi*t)
-plot(t, s2, 'r.')
-ylabel('sin')
-ax2.yaxis.tick_right()
-show()
+ax2 = ax1.twinx()
+s2 = np.sin(2*np.pi*t)
+ax2.plot(t, s2, 'r.')
+ax2.set_ylabel('sin')
+plt.show()
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2008-10-17 19:32:23
|
Revision: 6251
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6251&view=rev
Author: mdboom
Date: 2008-10-17 19:32:16 +0000 (Fri, 17 Oct 2008)
Log Message:
-----------
Include output images in examples in documentation.
Add "-*- noplot -*-" markers to examples where we don't want that.
The "plot" documentation directive now takes a path relative to the doc/ directory, not doc/pyplots.
Modified Paths:
--------------
trunk/matplotlib/doc/contents.rst
trunk/matplotlib/doc/devel/documenting_mpl.rst
trunk/matplotlib/doc/examples/gen_rst.py
trunk/matplotlib/doc/faq/howto_faq.rst
trunk/matplotlib/doc/pyplots/boxplot_demo.py
trunk/matplotlib/doc/pyplots/tex_demo.hires.png
trunk/matplotlib/doc/pyplots/tex_demo.pdf
trunk/matplotlib/doc/pyplots/tex_demo.png
trunk/matplotlib/doc/pyplots/tex_demo.py
trunk/matplotlib/doc/pyplots/tex_unicode_demo.hires.png
trunk/matplotlib/doc/pyplots/tex_unicode_demo.pdf
trunk/matplotlib/doc/pyplots/tex_unicode_demo.png
trunk/matplotlib/doc/sphinxext/plot_directive.py
trunk/matplotlib/doc/users/annotations.rst
trunk/matplotlib/doc/users/artists.rst
trunk/matplotlib/doc/users/mathtext.rst
trunk/matplotlib/doc/users/pyplot_tutorial.rst
trunk/matplotlib/doc/users/screenshots.rst
trunk/matplotlib/doc/users/text_intro.rst
trunk/matplotlib/doc/users/text_props.rst
trunk/matplotlib/doc/users/usetex.rst
trunk/matplotlib/examples/api/agg_oo.py
trunk/matplotlib/examples/api/font_family_rc.py
trunk/matplotlib/examples/api/font_file.py
trunk/matplotlib/examples/pylab_examples/annotation_demo.py
trunk/matplotlib/examples/pylab_examples/barh_demo.py
trunk/matplotlib/examples/pylab_examples/colours.py
trunk/matplotlib/examples/pylab_examples/cursor_demo.py
trunk/matplotlib/examples/pylab_examples/dannys_example.py
trunk/matplotlib/examples/pylab_examples/dashtick.py
trunk/matplotlib/examples/pylab_examples/font_table_ttf.py
trunk/matplotlib/examples/pylab_examples/ginput_demo.py
trunk/matplotlib/examples/pylab_examples/ginput_manual_clabel.py
trunk/matplotlib/examples/pylab_examples/movie_demo.py
trunk/matplotlib/examples/pylab_examples/print_stdout.py
trunk/matplotlib/examples/pylab_examples/pstest.py
trunk/matplotlib/examples/pylab_examples/scatter_profile.py
trunk/matplotlib/examples/pylab_examples/shared_axis_across_figures.py
trunk/matplotlib/examples/pylab_examples/simple_plot_fps.py
trunk/matplotlib/examples/pylab_examples/system_monitor.py
trunk/matplotlib/examples/pylab_examples/tex_unicode_demo.py
trunk/matplotlib/examples/pylab_examples/unicode_demo.py
trunk/matplotlib/examples/pylab_examples/webapp_demo.py
trunk/matplotlib/lib/matplotlib/artist.py
trunk/matplotlib/lib/matplotlib/axes.py
trunk/matplotlib/lib/matplotlib/contour.py
trunk/matplotlib/lib/matplotlib/figure.py
trunk/matplotlib/lib/matplotlib/text.py
trunk/matplotlib/lib/matplotlib/transforms.py
Removed Paths:
-------------
trunk/matplotlib/doc/pyplots/contour_demo.py
trunk/matplotlib/doc/pyplots/errorbar_demo.py
trunk/matplotlib/doc/pyplots/tex_unicode_demo.py
trunk/matplotlib/examples/pylab_examples/auto_layout.py
Modified: trunk/matplotlib/doc/contents.rst
===================================================================
--- trunk/matplotlib/doc/contents.rst 2008-10-17 18:51:10 UTC (rev 6250)
+++ trunk/matplotlib/doc/contents.rst 2008-10-17 19:32:16 UTC (rev 6251)
@@ -20,9 +20,8 @@
api/index.rst
glossary/index.rst
-
.. htmlonly::
- examples/index.rst
+ - `Examples <examples/index.html>`_
* :ref:`genindex`
* :ref:`modindex`
Modified: trunk/matplotlib/doc/devel/documenting_mpl.rst
===================================================================
--- trunk/matplotlib/doc/devel/documenting_mpl.rst 2008-10-17 18:51:10 UTC (rev 6250)
+++ trunk/matplotlib/doc/devel/documenting_mpl.rst 2008-10-17 19:32:16 UTC (rev 6251)
@@ -208,47 +208,38 @@
Dynamically generated figures
-----------------------------
-The top level :file:`doc` dir has a folder called :file:`pyplots` in
-which you should include any pyplot plotting scripts that you want to
-generate figures for the documentation. It is not necessary to
-explicitly save the figure in the script, this will be done
-automatically at build time to insure that the code that is included
-runs and produces the advertised figure. Several figures will be
-saved with the same basnename as the filename when the documentation
-is generated (low and high res PNGs, a PDF). Matplotlib includes a
-Sphinx extension (:file:`sphinxext/plot_directive.py`) for generating
-the images from the python script and including either a png copy for
-html or a pdf for latex::
+Figures can be automatically generated from scripts and included in
+the docs. It is not necessary to explicitly save the figure in the
+script, this will be done automatically at build time to ensure that
+the code that is included runs and produces the advertised figure.
+Several figures will be saved with the same basename as the filename
+when the documentation is generated (low and high res PNGs, a PDF).
+Matplotlib includes a Sphinx extension
+(:file:`sphinxext/plot_directive.py`) for generating the images from
+the python script and including either a png copy for html or a pdf
+for latex::
- .. plot:: pyplot_simple.py
+ .. plot:: pyplots/pyplot_simple.py
:include-source:
+If the script produces multiple figures (through multiple calls to
+:func:`pyplot.figure`), each will be given a numbered file name and
+included.
+
+The path should be relative to the ``doc`` directory. Any plots
+specific to the documentation should be added to the ``doc/pyplots``
+directory and committed to SVN. Plots from the ``examples`` directory
+may be referenced through the symlink ``mpl_examples`` in the ``doc``
+directory. eg.::
+
+ .. plot:: mpl_examples/pylab_examples/simple_plot.py
+
The ``:scale:`` directive rescales the image to some percentage of the
original size, though we don't recommend using this in most cases
since it is probably better to choose the correct figure size and dpi
in mpl and let it handle the scaling. ``:include-source:`` will
present the contents of the file, marked up as source code.
-You can also point to local files with relative path. Use the
-sym-link for mpl_examples in case we do a reorganization of the doc
-directory at some point, eg::
-
- .. plot:: ../mpl_examples/pylab_examples/simple_plot.py
-
-If the example file needs to access data, it is easy to get screwed up
-with relative paths since the python example may be run from a diffent
-location in the plot directive build framework. To work around this,
-you can add your example data to mpl-data/example and refer to it in
-the example file like so::
-
- import matplotlib
- # datafile is a file object
- datafile = matplotlib.get_example_data('goog.npy')
- r = np.load(datafile).view(np.recarray)
-
-Try to keep the example datafiles relatively few and relatively small
-to control the size of the binaries we ship.
-
Static figures
--------------
@@ -261,10 +252,20 @@
requirements necessary to generate a new figure. Once these steps have been
taken, these figures can be included in the usual way::
- .. plot:: tex_unicode_demo.py
+ .. plot:: pyplots/tex_unicode_demo.py
:include-source
+Examples
+--------
+The source of the files in the ``examples`` directory are
+automatically included in the HTML docs. An image is generated and
+included for all examples in the ``api`` and ``pylab_examples``
+directories. To exclude the example from having an image rendered,
+insert the following special comment anywhere in the script::
+
+ # -*- noplot -*-
+
.. _referring-to-mpl-docs:
Referring to mpl documents
Modified: trunk/matplotlib/doc/examples/gen_rst.py
===================================================================
--- trunk/matplotlib/doc/examples/gen_rst.py 2008-10-17 18:51:10 UTC (rev 6250)
+++ trunk/matplotlib/doc/examples/gen_rst.py 2008-10-17 19:32:16 UTC (rev 6251)
@@ -5,12 +5,22 @@
import matplotlib.cbook as cbook
-
import os
+import re
import sys
fileList = []
rootdir = '../mpl_examples'
+def out_of_date(original, derived):
+ """
+ Returns True if derivative is out-of-date wrt original,
+ both of which are full file paths.
+ """
+ return (not os.path.exists(derived) or
+ os.stat(derived).st_mtime < os.stat(original).st_mtime)
+
+noplot_regex = re.compile(r"#\s*-\*-\s*noplot\s*-\*-")
+
datad = {}
for root, subFolders, files in os.walk(rootdir):
for fname in files:
@@ -22,7 +32,7 @@
contents = file(fullpath).read()
# indent
relpath = os.path.split(root)[-1]
- datad.setdefault(relpath, []).append((fname, contents))
+ datad.setdefault(relpath, []).append((fullpath, fname, contents))
subdirs = datad.keys()
subdirs.sort()
@@ -48,7 +58,7 @@
for subdir in subdirs:
if not os.path.exists(subdir):
os.makedirs(subdir)
-
+
static_dir = os.path.join('..', '_static', 'examples')
if not os.path.exists(static_dir):
os.makedirs(static_dir)
@@ -83,37 +93,48 @@
print subdir
-
+
data = datad[subdir]
data.sort()
- for fname, contents in data:
+ for fullname, fname, contents in data:
+ static_file = os.path.join(static_dir, fname)
+ basename, ext = os.path.splitext(fname)
+ rstfile = '%s.rst'%basename
+ outfile = os.path.join(subdir, rstfile)
+ fhsubdirIndex.write(' %s\n'%rstfile)
- static_file = os.path.join(static_dir, fname)
+ if (not out_of_date(fullname, static_file) and
+ not out_of_date(fullname, outfile)):
+ continue
+
+ print ' %s'%fname
+
fhstatic = file(static_file, 'w')
fhstatic.write(contents)
fhstatic.close()
- basename, ext = os.path.splitext(fname)
- rstfile = '%s.rst'%basename
- outfile = os.path.join(subdir, rstfile)
- fhsubdirIndex.write(' %s\n'%rstfile)
fh = file(outfile, 'w')
fh.write('.. _%s-%s:\n\n'%(subdir, basename))
title = '%s example code: %s'%(subdir, fname)
fh.write(title + '\n')
fh.write('='*len(title) + '\n\n')
-
- print ' %s'%fname
+ do_plot = (subdir in ('api',
+ 'pylab_examples',
+ 'units') and
+ not noplot_regex.search(contents))
- linkname = os.path.join('..', '..', '_static', 'examples', subdir, fname)
- fh.write('%s (`link to source <%s>`_)::\n\n'%(fname, linkname))
+ if do_plot:
+ fh.write("\n\n.. plot:: %s\n\n::\n\n" % fullname[3:])
+ else:
+ linkname = os.path.join('..', '..', '_static', 'examples', subdir, fname)
+ fh.write("[`source code <%s>`_]\n\n::\n\n" % linkname)
# indent the contents
contents = '\n'.join([' %s'%row.rstrip() for row in contents.split('\n')])
+ fh.write(contents)
- fh.write(contents)
fh.write('\n\nKeyword: codex (see :ref:`how-to-search-examples`)')
fh.close()
Modified: trunk/matplotlib/doc/faq/howto_faq.rst
===================================================================
--- trunk/matplotlib/doc/faq/howto_faq.rst 2008-10-17 18:51:10 UTC (rev 6250)
+++ trunk/matplotlib/doc/faq/howto_faq.rst 2008-10-17 19:32:16 UTC (rev 6251)
@@ -148,7 +148,7 @@
of each of the labels and uses it to move the left of the subplots
over so that the tick labels fit in the figure
-.. plot:: auto_subplots_adjust.py
+.. plot:: pyplots/auto_subplots_adjust.py
:include-source:
.. _howto-ticks:
@@ -191,7 +191,7 @@
below shows the default behavior in the left subplots, and the manual
setting in the right subplots.
-.. plot:: align_ylabels.py
+.. plot:: pyplots/align_ylabels.py
:include-source:
.. _date-index-plots:
Modified: trunk/matplotlib/doc/pyplots/boxplot_demo.py
===================================================================
--- trunk/matplotlib/doc/pyplots/boxplot_demo.py 2008-10-17 18:51:10 UTC (rev 6250)
+++ trunk/matplotlib/doc/pyplots/boxplot_demo.py 2008-10-17 19:32:16 UTC (rev 6251)
@@ -1,21 +1,55 @@
-import numpy as np
-import matplotlib.pyplot as plt
+#!/usr/bin/python
-spread = np.random.rand(50) * 100
-center = np.ones(25) * 50
-flier_high = np.random.rand(10) * 100 + 100
-flier_low = np.random.rand(10) * -100
-data = np.concatenate((spread, center, flier_high, flier_low), 0)
+#
+# Example boxplot code
+#
+from pylab import *
+
+# fake up some data
+spread= rand(50) * 100
+center = ones(25) * 50
+flier_high = rand(10) * 100 + 100
+flier_low = rand(10) * -100
+data =concatenate((spread, center, flier_high, flier_low), 0)
+
+# basic plot
+boxplot(data)
+#savefig('box1')
+
+# notched plot
+figure()
+boxplot(data,1)
+#savefig('box2')
+
+# change outlier point symbols
+figure()
+boxplot(data,0,'gD')
+#savefig('box3')
+
+# don't show outlier points
+figure()
+boxplot(data,0,'')
+#savefig('box4')
+
+# horizontal boxes
+figure()
+boxplot(data,0,'rs',0)
+#savefig('box5')
+
+# change whisker length
+figure()
+boxplot(data,0,'rs',0,0.75)
+#savefig('box6')
+
# fake up some more data
-spread = np.random.rand(50) * 100
-center = np.ones(25) * 40
-flier_high = np.random.rand(10) * 100 + 100
-flier_low = np.random.rand(10) * -100
-d2 = np.concatenate( (spread, center, flier_high, flier_low), 0 )
+spread= rand(50) * 100
+center = ones(25) * 40
+flier_high = rand(10) * 100 + 100
+flier_low = rand(10) * -100
+d2 = concatenate( (spread, center, flier_high, flier_low), 0 )
data.shape = (-1, 1)
d2.shape = (-1, 1)
-
#data = concatenate( (data, d2), 1 )
# Making a 2-D array only works if all the columns are the
# same length. If they are not, then use a list instead.
@@ -23,7 +57,9 @@
# a 2-D array into a list of vectors internally anyway.
data = [data, d2, d2[::2,0]]
# multiple box plots on one figure
+figure()
+boxplot(data)
+#savefig('box7')
-plt.boxplot(data)
-plt.show()
+show()
Deleted: trunk/matplotlib/doc/pyplots/contour_demo.py
===================================================================
--- trunk/matplotlib/doc/pyplots/contour_demo.py 2008-10-17 18:51:10 UTC (rev 6250)
+++ trunk/matplotlib/doc/pyplots/contour_demo.py 2008-10-17 19:32:16 UTC (rev 6251)
@@ -1,66 +0,0 @@
-#!/usr/bin/env python
-"""
-Illustrate simple contour plotting, contours on an image with
-a colorbar for the contours, and labelled contours.
-
-See also contour_image.py.
-"""
-import matplotlib
-import numpy as np
-import matplotlib.cm as cm
-import matplotlib.mlab as mlab
-import matplotlib.pyplot as plt
-
-matplotlib.rcParams['xtick.direction'] = 'out'
-matplotlib.rcParams['ytick.direction'] = 'out'
-
-delta = 0.025
-x = np.arange(-3.0, 3.0, delta)
-y = np.arange(-2.0, 2.0, delta)
-X, Y = np.meshgrid(x, y)
-Z1 = mlab.bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0)
-Z2 = mlab.bivariate_normal(X, Y, 1.5, 0.5, 1, 1)
-# difference of Gaussians
-Z = 10.0 * (Z2 - Z1)
-
-
-# You can use a colormap to specify the colors; the default
-# colormap will be used for the contour lines
-plt.figure()
-im = plt.imshow(Z, interpolation='bilinear', origin='lower',
- cmap=cm.gray, extent=(-3,3,-2,2))
-levels = np.arange(-1.2, 1.6, 0.2)
-CS = plt.contour(Z, levels,
- origin='lower',
- linewidths=2,
- extent=(-3,3,-2,2))
-
-#Thicken the zero contour.
-zc = CS.collections[6]
-plt.setp(zc, linewidth=4)
-
-plt.clabel(CS, levels[1::2], # label every second level
- inline=1,
- fmt='%1.1f',
- fontsize=14)
-
-# make a colorbar for the contour lines
-CB = plt.colorbar(CS, shrink=0.8, extend='both')
-
-plt.title('Lines with colorbar')
-#plt.hot() # Now change the colormap for the contour lines and colorbar
-plt.flag()
-
-# We can still add a colorbar for the image, too.
-CBI = plt.colorbar(im, orientation='horizontal', shrink=0.8)
-
-# This makes the original colorbar look a bit out of place,
-# so let's improve its position.
-
-l,b,w,h = plt.gca().get_position().bounds
-ll,bb,ww,hh = CB.ax.get_position().bounds
-CB.ax.set_position([ll, b+0.1*h, ww, h*0.8])
-
-
-#savefig('contour_demo')
-plt.show()
Deleted: trunk/matplotlib/doc/pyplots/errorbar_demo.py
===================================================================
--- trunk/matplotlib/doc/pyplots/errorbar_demo.py 2008-10-17 18:51:10 UTC (rev 6250)
+++ trunk/matplotlib/doc/pyplots/errorbar_demo.py 2008-10-17 19:32:16 UTC (rev 6251)
@@ -1,8 +0,0 @@
-import numpy as np
-import matplotlib.pyplot as plt
-
-t = np.arange(0.1, 4, 0.1)
-s = np.exp(-t)
-e, f = 0.1*np.absolute(np.random.randn(2, len(s)))
-plt.errorbar(t, s, e, fmt='o') # vertical symmetric
-plt.show()
Modified: trunk/matplotlib/doc/pyplots/tex_demo.hires.png
===================================================================
(Binary files differ)
Modified: trunk/matplotlib/doc/pyplots/tex_demo.pdf
===================================================================
--- trunk/matplotlib/doc/pyplots/tex_demo.pdf 2008-10-17 18:51:10 UTC (rev 6250)
+++ trunk/matplotlib/doc/pyplots/tex_demo.pdf 2008-10-17 19:32:16 UTC (rev 6251)
@@ -4,7 +4,7 @@
<< /Type /Catalog /Pages 3 0 R >>
endobj
2 0 obj
-<< /CreationDate (D:20081014161405-05'00')
+<< /CreationDate (D:20081017151352-04'00')
/Producer (matplotlib pdf backend)
/Creator (matplotlib 0.98.3, http://matplotlib.sf.net) >>
endobj
@@ -44,673 +44,291 @@
1864
endobj
36 0 obj
-<< /BaseFont /CMMI12 /Type /Font /Subtype /Type1 /FontDescriptor 35 0 R
+<<
+/Encoding <<
+/Differences [ 0 /minus /periodcentered /multiply /asteriskmath /divide /diamondmath
+/plusminus /minusplus /circleplus /circleminus /circlemultiply
+/circledivide /circledot /circlecopyrt /openbullet /bullet /equivasymptotic
+/equivalence /reflexsubset /reflexsuperset /lessequal /greaterequal
+/precedesequal /followsequal /similar /approxequal /propersubset
+/propersuperset /lessmuch /greatermuch /precedes /follows /arrowleft
+/arrowright /arrowup /arrowdown /arrowboth /arrownortheast /arrowsoutheast
+/similarequal /arrowdblleft /arrowdblright /arrowdblup /arrowdbldown
+/arrowdblboth /arrownorthwest /arrowsouthwest /proportional /prime
+/infinity /element /owner /triangle /triangleinv /negationslash /mapsto
+/universal /existential /logicalnot /emptyset /Rfractur /Ifractur
+/latticetop /perpendicular /aleph /A /B /C /D /E /F /G /H /I /J /K /L /M /N
+/O /P /Q /R /S /T /U /V /W /X /Y /Z /union /intersection /unionmulti
+/logicaland /logicalor /turnstileleft /turnstileright /floorleft
+/floorright /ceilingleft /ceilingright /braceleft /braceright
+/angbracketleft /angbracketright /bar /bardbl /arrowbothv /arrowdblbothv
+/backslash /wreathproduct /radical /coproduct /nabla /integral /unionsq
+/intersectionsq /subsetsqequal /supersetsqequal /section /dagger /daggerdbl
+/paragraph /club /diamond /heart /spade /arrowleft /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /minus
+/periodcentered /multiply /asteriskmath /divide /diamondmath /plusminus
+/minusplus /circleplus /circleminus /.notdef /.notdef /circlemultiply
+/circledivide /circledot /circlecopyrt /openbullet /bullet /equivasymptotic
+/equivalence /reflexsubset /reflexsuperset /lessequal /greaterequal
+/precedesequal /followsequal /similar /approxequal /propersubset
+/propersuperset /lessmuch /greatermuch /precedes /follows /arrowleft /spade
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef ]
+/Type /Encoding >>
+/BaseFont /CMSY10 /Type /Font /Subtype /Type1 /FontDescriptor 35 0 R
/Widths 34 0 R /LastChar 125 /FirstChar 0 >>
endobj
34 0 obj
-[ 606 815 748 679 728 811 765 571 652 598 757 622 552 507 433 395 427 483
-456 346 563 571 589 483 427 555 505 556 425 527 579 613 636 609 458 577 808
-505 354 641 979 979 979 979 271 271 489 489 489 489 489 489 489 489 489 489
-489 489 271 271 761 489 761 489 516 734 743 700 812 724 633 772 811 431 541
-833 666 947 784 748 631 775 745 602 573 665 570 924 812 568 670 380 380 380
-979 979 410 513 416 421 508 453 482 468 563 334 405 509 291 856 584 470 491
-434 441 461 353 557 473 699 556 477 454 312 377 623 ]
+[ 777 277 777 500 777 500 777 777 777 777 777 777 777 1000 500 500 777 777
+777 777 777 777 777 777 777 777 777 777 1000 1000 777 777 1000 1000 500 500
+1000 1000 1000 777 1000 1000 611 611 1000 1000 1000 777 274 1000 666 666
+888 888 0 0 555 555 666 500 722 722 777 777 611 798 656 526 771 527 718 594
+844 544 677 761 689 1200 820 796 695 816 847 605 544 625 612 987 713 668
+724 666 666 666 666 666 611 611 444 444 444 444 500 500 388 388 277 500 500
+611 500 277 833 750 833 416 666 666 777 777 444 444 444 611 777 777 ]
endobj
35 0 obj
-<< /FontFile 37 0 R /FontName /CMMI12 /Descent -250
-/FontBBox [ -30 -250 1026 750 ] /CapHeight 1000 /Ascent 750
+<< /FontFile 37 0 R /FontName /CMSY10 /Descent -960
+/FontBBox [ -29 -960 1116 775 ] /CapHeight 1000 /Ascent 775
/FontFamily (Computer Modern) /StemV 50 /Flags 68 /XHeight 500
/ItalicAngle -14 /Type /FontDescriptor >>
endobj
37 0 obj
-<< /Length3 0 /Length2 27245 /Length1 3667 /Length 28908
+<< /Length3 0 /Length2 21763 /Length1 4313 /Length 23626
/Filter /FlateDecode >>
stream
-x\x9C\x94\xB7eX˺\xB5\x8D\xBBC\x90`3@pwww
- \xD8\xC4\xDD\xDD=\xB7\xE0Np\xF7\xE0\xC1\xDD\x82{p\xF8f\xF6\xD9\xEF Y\xEB\xFC\xF9.\xFE0Fu\xEB\xA9\xD1\xF5t\xBF\xA7\xA8B'ddc |
|
From: <jd...@us...> - 2008-10-17 20:24:10
|
Revision: 6252
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6252&view=rev
Author: jdh2358
Date: 2008-10-17 20:24:06 +0000 (Fri, 17 Oct 2008)
Log Message:
-----------
added mlab api docs
Modified Paths:
--------------
trunk/matplotlib/doc/api/index.rst
trunk/matplotlib/doc/users/index.rst
trunk/matplotlib/lib/matplotlib/axes.py
trunk/matplotlib/lib/matplotlib/mlab.py
Added Paths:
-----------
trunk/matplotlib/doc/api/mlab_api.rst
Modified: trunk/matplotlib/doc/api/index.rst
===================================================================
--- trunk/matplotlib/doc/api/index.rst 2008-10-17 19:32:16 UTC (rev 6251)
+++ trunk/matplotlib/doc/api/index.rst 2008-10-17 20:24:06 UTC (rev 6252)
@@ -23,6 +23,7 @@
colorbar_api.rst
colors_api.rst
nxutils_api.rst
+ mlab_api.rst
path_api.rst
pyplot_api.rst
index_backend_api.rst
Added: trunk/matplotlib/doc/api/mlab_api.rst
===================================================================
--- trunk/matplotlib/doc/api/mlab_api.rst (rev 0)
+++ trunk/matplotlib/doc/api/mlab_api.rst 2008-10-17 20:24:06 UTC (rev 6252)
@@ -0,0 +1,12 @@
+****************
+matplotlib mlab
+****************
+
+
+:mod:`matplotlib.mlab`
+=======================
+
+.. automodule:: matplotlib.mlab
+ :members:
+ :undoc-members:
+ :show-inheritance:
Modified: trunk/matplotlib/doc/users/index.rst
===================================================================
--- trunk/matplotlib/doc/users/index.rst 2008-10-17 19:32:16 UTC (rev 6251)
+++ trunk/matplotlib/doc/users/index.rst 2008-10-17 20:24:06 UTC (rev 6252)
@@ -21,6 +21,7 @@
index_text.rst
artists.rst
event_handling.rst
+ plotting.rst
toolkits.rst
screenshots.rst
license.rst
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py 2008-10-17 19:32:16 UTC (rev 6251)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2008-10-17 20:24:06 UTC (rev 6252)
@@ -3387,7 +3387,7 @@
maxlags=None, **kwargs)
Plot the autocorrelation of *x*. If *normed* = *True*,
- normalize the data but the autocorrelation at 0-th lag. *x* is
+ normalize the data by the autocorrelation at 0-th lag. *x* is
detrended by the *detrend* callable (default no normalization).
Data are plotted as ``plot(lags, c, **kwargs)``
@@ -4370,7 +4370,7 @@
**Example:**
- .. plot:: mpl_examples/pyplot_examples/errorbar_demo.py
+ .. plot:: mpl_examples/pylab_examples/errorbar_demo.py
"""
Modified: trunk/matplotlib/lib/matplotlib/mlab.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/mlab.py 2008-10-17 19:32:16 UTC (rev 6251)
+++ trunk/matplotlib/lib/matplotlib/mlab.py 2008-10-17 20:24:06 UTC (rev 6252)
@@ -3,66 +3,94 @@
Numerical python functions written for compatability with matlab(TM)
commands with the same names.
- Matlab(TM) compatible functions:
+Matlab(TM) compatible functions
+-------------------------------
- * cohere - Coherence (normalized cross spectral density)
+:func:`cohere`
+ Coherence (normalized cross spectral density)
- * csd - Cross spectral density uing Welch's average periodogram
+:func:`csd`
+ Cross spectral density uing Welch's average periodogram
- * detrend -- Remove the mean or best fit line from an array
+:func:`detrend`
+ Remove the mean or best fit line from an array
- * find - Return the indices where some condition is true;
- numpy.nonzero is similar but more general.
+:func:`find`
+ Return the indices where some condition is true;
+ numpy.nonzero is similar but more general.
- * griddata - interpolate irregularly distributed data to a
- regular grid.
+:func:`griddata`
+ interpolate irregularly distributed data to a
+ regular grid.
- * prctile - find the percentiles of a sequence
+:func:`prctile`
+ find the percentiles of a sequence
- * prepca - Principal Component Analysis
+:func:`prepca`
+ Principal Component Analysis
- * psd - Power spectral density uing Welch's average periodogram
+:func:`psd`
+ Power spectral density uing Welch's average periodogram
- * rk4 - A 4th order runge kutta integrator for 1D or ND systems
+:func:`rk4`
+ A 4th order runge kutta integrator for 1D or ND systems
- The following are deprecated; please import directly from numpy
- (with care--function signatures may differ):
+Miscellaneous functions
+-------------------------
- * conv - convolution (numpy.convolve)
- * corrcoef - The matrix of correlation coefficients
- * hist -- Histogram (numpy.histogram)
- * linspace -- Linear spaced array from min to max
- * meshgrid
- * polyfit - least squares best polynomial fit of x to y
- * polyval - evaluate a vector for a vector of polynomial coeffs
- * trapz - trapeziodal integration (trapz(x,y) -> numpy.trapz(y,x))
- * vander - the Vandermonde matrix
+Functions that don't exist in matlab(TM), but are useful anyway:
- Functions that don't exist in matlab(TM), but are useful anyway:
+:meth:`cohere_pairs`
+ Coherence over all pairs. This is not a matlab function, but we
+ compute coherence a lot in my lab, and we compute it for a lot of
+ pairs. This function is optimized to do this efficiently by
+ caching the direct FFTs.
- * cohere_pairs - Coherence over all pairs. This is not a matlab
- function, but we compute coherence a lot in my lab, and we
- compute it for a lot of pairs. This function is optimized to do
- this efficiently by caching the direct FFTs.
+:meth:`rk4`
+ A 4th order Runge-Kutta ODE integrator in case you ever find
+ yourself stranded without scipy (and the far superior
+ scipy.integrate tools)
-= record array helper functions =
- * rec2txt : pretty print a record array
- * rec2csv : store record array in CSV file
- * csv2rec : import record array from CSV file with type inspection
- * rec_append_fields: adds field(s)/array(s) to record array
- * rec_drop_fields : drop fields from record array
- * rec_join : join two record arrays on sequence of fields
- * rec_groupby : summarize data by groups (similar to SQL GROUP BY)
- * rec_summarize : helper code to filter rec array fields into new fields
+record array helper functions
+-------------------------------
+A collection of helper methods for numpyrecord arrays
+
+.. _htmlonly::
+
+ See :ref:`misc-examples-index`
+
+:meth:`rec2txt`
+ pretty print a record array
+
+:meth:`rec2csv`
+ store record array in CSV file
+
+:meth:`csv2rec`
+ import record array from CSV file with type inspection
+
+:meth:`rec_append_fields`
+ adds field(s)/array(s) to record array
+
+:meth:`rec_drop_fields`
+ drop fields from record array
+
+:meth:`rec_join`
+ join two record arrays on sequence of fields
+
+:meth:`rec_groupby`
+ summarize data by groups (similar to SQL GROUP BY)
+
+:meth:`rec_summarize`
+ helper code to filter rec array fields into new fields
+
For the rec viewer functions(e rec2csv), there are a bunch of Format
objects you can pass into the functions that will do things like color
negative values red, set percent formatting and scaling, etc.
+Example usage::
-Example usage:
-
r = csv2rec('somefile.csv', checkrows=0)
formatd = dict(
@@ -82,6 +110,40 @@
win.show_all()
gtk.main()
+
+Deprecated functions
+---------------------
+
+The following are deprecated; please import directly from numpy (with
+care--function signatures may differ):
+
+:meth:`conv`
+ convolution (numpy.convolve)
+
+:meth:`corrcoef`
+ The matrix of correlation coefficients
+
+:meth:`hist`
+ Histogram (numpy.histogram)
+
+:meth:`linspace`
+ Linear spaced array from min to max
+
+:meth:`meshgrid`
+ Make a 2D grid from 2 1 arrays (numpy.meshgrid)
+
+:meth:`polyfit`
+ least squares best polynomial fit of x to y (numpy.polyfit)
+
+:meth:`polyval`
+ evaluate a vector for a vector of polynomial coeffs (numpy.polyval)
+
+:meth:`trapz`
+ trapeziodal integration (trapz(x,y) -> numpy.trapz(y,x))
+
+:meth:`vander`
+ the Vandermonde matrix (numpy.vander)
+
"""
from __future__ import division
@@ -185,20 +247,23 @@
to calculate the Fourier frequencies, freqs, in cycles per time
unit.
- -- NFFT must be even; a power 2 is most efficient.
- -- detrend is a functions, unlike in matlab where it is a vector.
- -- window can be a function or a vector of length NFFT. To create window
- vectors see numpy.blackman, numpy.hamming, numpy.bartlett,
- scipy.signal, scipy.signal.get_window etc.
- -- if length x < NFFT, it will be zero padded to NFFT
+ *NFFT*
+ The length of the FFT window. Must be even; a power 2 is most efficient.
+ *detrend*
+ is a function, unlike in matlab where it is a vector.
- Returns the tuple Pxx, freqs
+ *window*
+ can be a function or a vector of length NFFT. To create window
+ vectors see numpy.blackman, numpy.hamming, numpy.bartlett,
+ scipy.signal, scipy.signal.get_window etc.
- Refs:
- Bendat & Piersol -- Random Data: Analysis and Measurement
- Procedures, John Wiley & Sons (1986)
+ If length x < NFFT, it will be zero padded to NFFT
+ Returns the tuple (*Pxx*, *freqs*)
+
+ Refs: Bendat & Piersol -- Random Data: Analysis and Measurement Procedures, John Wiley & Sons (1986)
+
"""
# I think we could remove this condition without hurting anything.
if NFFT % 2:
@@ -409,7 +474,7 @@
window=window_hanning, noverlap=0):
"""
The coherence between x and y. Coherence is the normalized
- cross spectral density
+ cross spectral density:
.. math::
@@ -470,7 +535,7 @@
Method: if X is a the Vandermonde Matrix computed from x (see
- http://mathworld.wolfram.com/VandermondeMatrix.html), then the
+ `vandermonds <http://mathworld.wolfram.com/VandermondeMatrix.html>`_), then the
polynomial least squares solution is given by the 'p' in
X*p = y
@@ -487,7 +552,7 @@
numpy.linalg.lstsq.
For more info, see
- http://mathworld.wolfram.com/LeastSquaresFittingPolynomial.html,
+ `least squares fitting <http://mathworld.wolfram.com/LeastSquaresFittingPolynomial.html>`_,
but note that the k's and n's in the superscripts and subscripts
on that page. The linear algebra is correct, however.
@@ -898,14 +963,21 @@
def rk4(derivs, y0, t):
"""
- Integrate 1D or ND system of ODEs from initial state y0 at sample
- times t. derivs returns the derivative of the system and has the
- signature
+ Integrate 1D or ND system of ODEs using 4-th order Runge-Kutta. This is a toy implementation which may be useful if you find yourself stranded on a system w/o scipy. Otherwise use ``scipy.integrate``
- dy = derivs(yi, ti)
+ *y0*
+ initial state vector
+
+ *t*
+ sample times
- Example 1 :
+ *derivs*
+ returns the derivative of the system and has the
+ signature ``dy = derivs(yi, ti)``
+
+ Example 1 ::
+
## 2D system
def derivs6(x,t):
@@ -917,7 +989,7 @@
y0 = (1,2)
yout = rk4(derivs6, y0, t)
- Example 2:
+ Example 2::
## 1D system
alpha = 2
@@ -963,7 +1035,7 @@
"""
Bivariate gaussan distribution for equal shape X, Y
- http://mathworld.wolfram.com/BivariateNormalDistribution.html
+ See `bivariate normal <http://mathworld.wolfram.com/BivariateNormalDistribution.html>`_ at mathworld.
"""
Xmu = X-mux
Ymu = Y-muy
@@ -1074,13 +1146,16 @@
*x* is a very long trajectory from a map, and *fprime* returns the
derivative of *x*.
- Returns :math:`\lambda = \frac{1}{n}\sum \ln|f^'(x_i)|`
+ Returns :
+ .. math::
+ \lambda = \frac{1}{n}\sum \ln|f^'(x_i)|
+
.. seealso::
Sec 10.5 Strogatz (1994) "Nonlinear Dynamics and Chaos".
`Wikipedia article on Lyapunov Exponent
- http://en.wikipedia.org/wiki/Lyapunov_exponent`_.
+ <http://en.wikipedia.org/wiki/Lyapunov_exponent>`_.
.. note::
What the function here calculates may not be what you really want;
@@ -1510,14 +1585,15 @@
return np.diag(diag)
def identity(n, rank=2, dtype='l', typecode=None):
- """identity(n,r) returns the identity matrix of shape (n,n,...,n) (rank r).
+ """Returns the identity matrix of shape (n,n,...,n) (rank r).
For ranks higher than 2, this object is simply a multi-index Kronecker
- delta:
- / 1 if i0=i1=...=iR,
- id[i0,i1,...,iR] = -|
- \ 0 otherwise.
+ delta::
+ / 1 if i0=i1=...=iR,
+ id[i0,i1,...,iR] = -|
+ \ 0 otherwise.
+
Optionally a dtype (or typecode) may be given (it defaults to 'l').
Since rank defaults to 2, this function behaves in the default case (when
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2008-10-19 19:52:50
|
Revision: 6278
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6278&view=rev
Author: jdh2358
Date: 2008-10-19 19:52:38 +0000 (Sun, 19 Oct 2008)
Log Message:
-----------
fixed np clip bug and some other cleanup
Modified Paths:
--------------
trunk/matplotlib/doc/sphinxext/plot_directive.py
trunk/matplotlib/examples/animation/simple_anim_tkagg.py
trunk/matplotlib/examples/pylab_examples/masked_demo.py
trunk/matplotlib/lib/matplotlib/colors.py
Modified: trunk/matplotlib/doc/sphinxext/plot_directive.py
===================================================================
--- trunk/matplotlib/doc/sphinxext/plot_directive.py 2008-10-19 09:35:03 UTC (rev 6277)
+++ trunk/matplotlib/doc/sphinxext/plot_directive.py 2008-10-19 19:52:38 UTC (rev 6278)
@@ -24,7 +24,7 @@
align = Image.align
import matplotlib
-
+import matplotlib.cbook as cbook
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from matplotlib import _pylab_helpers
@@ -148,7 +148,8 @@
try:
runfile(fullpath)
except:
- warnings.warn("Exception running plot %s" % fullpath)
+ s = cbook.exception_to_str("Exception running plot %s" % fullpath)
+ warnings.warn(s)
return 0
fig_managers = _pylab_helpers.Gcf.get_all_fig_managers()
@@ -162,7 +163,8 @@
try:
figman.canvas.figure.savefig(outpath, dpi=dpi)
except:
- warnings.warn("Exception running plot %s" % fullpath)
+ s = cbook.exception_to_str("Exception running plot %s" % fullpath)
+ warnings.warn(s)
return 0
return len(fig_managers)
@@ -171,7 +173,7 @@
reference = directives.uri(arguments[0])
basedir, fname = os.path.split(reference)
basename, ext = os.path.splitext(fname)
-
+ #print 'plotdir', reference, basename, ext
destdir = ('../' * reference.count('/')) + 'pyplots'
num_figs = makefig(reference, 'pyplots')
Modified: trunk/matplotlib/examples/animation/simple_anim_tkagg.py
===================================================================
--- trunk/matplotlib/examples/animation/simple_anim_tkagg.py 2008-10-19 09:35:03 UTC (rev 6277)
+++ trunk/matplotlib/examples/animation/simple_anim_tkagg.py 2008-10-19 19:52:38 UTC (rev 6278)
@@ -2,6 +2,8 @@
"""
A simple example of an animated plot in tkagg
"""
+import time
+import numpy as np
import matplotlib
matplotlib.use('TkAgg') # do this before importing pylab
Modified: trunk/matplotlib/examples/pylab_examples/masked_demo.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/masked_demo.py 2008-10-19 09:35:03 UTC (rev 6277)
+++ trunk/matplotlib/examples/pylab_examples/masked_demo.py 2008-10-19 19:52:38 UTC (rev 6278)
@@ -1,4 +1,4 @@
-#!/bin/env python
+#!/usr/bin/env python
'''
Plot lines with points masked out.
Modified: trunk/matplotlib/lib/matplotlib/colors.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/colors.py 2008-10-19 09:35:03 UTC (rev 6277)
+++ trunk/matplotlib/lib/matplotlib/colors.py 2008-10-19 19:52:38 UTC (rev 6278)
@@ -38,6 +38,11 @@
from numpy import ma
import matplotlib.cbook as cbook
+parts = np.__version__.split('.')
+NP_MAJOR, NP_MINOR = map(int, parts[:2])
+# true if clip supports the out kwarg
+NP_CLIP_OUT = NP_MAJOR>=1 and NP_MINOR>=2
+
cnames = {
'aliceblue' : '#F0F8FF',
'antiquewhite' : '#FAEBD7',
@@ -457,7 +462,11 @@
np.putmask(xa, xa==1.0, 0.9999999) #Treat 1.0 as slightly less than 1.
# The following clip is fast, and prevents possible
# conversion of large positive values to negative integers.
- np.clip(xa * self.N, -1, self.N, out=xa)
+
+ if NP_CLIP_OUT:
+ np.clip(xa * self.N, -1, self.N, out=xa)
+ else:
+ xa = np.clip(xa * self.N, -1, self.N)
xa = xa.astype(int)
# Set the over-range indices before the under-range;
# otherwise the under-range values get converted to over-range.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mme...@us...> - 2008-10-20 07:53:09
|
Revision: 6280
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6280&view=rev
Author: mmetz_bn
Date: 2008-10-20 07:52:58 +0000 (Mon, 20 Oct 2008)
Log Message:
-----------
Applied scatleg patch
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/lib/matplotlib/collections.py
trunk/matplotlib/lib/matplotlib/legend.py
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2008-10-19 20:35:21 UTC (rev 6279)
+++ trunk/matplotlib/CHANGELOG 2008-10-20 07:52:58 UTC (rev 6280)
@@ -1,3 +1,6 @@
+2008-10-20 Applied scatleg patch based on ideas and work by Erik
+ Tollerud and Jae-Joon Lee. - MM
+
2008-10-11 Fixed bug in pdf backend: if you pass a file object for
output instead of a filename, e.g. in a wep app, we now
flush the object at the end. - JKS
Modified: trunk/matplotlib/lib/matplotlib/collections.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/collections.py 2008-10-19 20:35:21 UTC (rev 6279)
+++ trunk/matplotlib/lib/matplotlib/collections.py 2008-10-20 07:52:58 UTC (rev 6280)
@@ -148,6 +148,12 @@
result = result.inverse_transformed(transData)
return result
+ def get_window_extent(self, renderer):
+ bbox = self.get_datalim(transforms.IdentityTransform())
+ #TODO:check to ensure that this does not fail for
+ #cases other than scatter plot legend
+ return bbox
+
def _prepare_points(self):
"""Point prep for drawing and hit testing"""
@@ -417,7 +423,19 @@
else:
self._edgecolors = self.to_rgba(self._A, self._alpha)
+ def update_from(self, other):
+ 'copy properties from other to self'
+ artist.Artist.update_from(self, other)
+ self._antialiaseds = other._antialiaseds
+ self._edgecolors_original = other._edgecolors_original
+ self._edgecolors = other._edgecolors
+ self._facecolors_original = other._facecolors_original
+ self._facecolors = other._facecolors
+ self._linewidths = other._linewidths
+ self._linestyles = other._linestyles
+ self._pickradius = other._pickradius
+
# these are not available for the object inspector until after the
# class is built so we define an initial set here for the init
# function and they will be overridden after object defn
@@ -690,6 +708,7 @@
"""
Collection.__init__(self,**kwargs)
self._sizes = sizes
+ self._numsides = numsides
self._paths = [self._path_generator(numsides)]
self._rotation = rotation
self.set_transform(transforms.IdentityTransform())
@@ -706,7 +725,16 @@
def get_paths(self):
return self._paths
+ def get_numsides(self):
+ return self._numsides
+ def get_rotation(self):
+ return self._rotation
+
+ def get_sizes(self):
+ return self._sizes
+
+
class StarPolygonCollection(RegularPolyCollection):
"""
Draw a collection of regular stars with *numsides* points."""
Modified: trunk/matplotlib/lib/matplotlib/legend.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/legend.py 2008-10-19 20:35:21 UTC (rev 6279)
+++ trunk/matplotlib/lib/matplotlib/legend.py 2008-10-20 07:52:58 UTC (rev 6280)
@@ -92,8 +92,8 @@
handlelen = None, # the length of the legend lines
handletextsep = None, # the space between the legend line and legend text
axespad = None, # the border between the axes and legend edge
-
- shadow = None
+ shadow = None,
+ scatteryoffsets=None,
):
"""
parent # the artist that contains the legend
@@ -105,6 +105,7 @@
pad = 0.2 # the fractional whitespace inside the legend border
markerscale = 0.6 # the relative size of legend markers vs. original
shadow # if True, draw a shadow behind legend
+ scatteryoffsets # a list of yoffsets for scatter symbols in legend
The following dimensions are in axes coords
labelsep = 0.005 # the vertical space between the legend entries
@@ -117,8 +118,10 @@
Artist.__init__(self)
- proplist=[numpoints, pad, borderpad, markerscale, labelsep, handlelen, handletextsep, axespad, shadow]
- propnames=['numpoints', 'pad', 'borderpad', 'markerscale', 'labelsep', 'handlelen', 'handletextsep', 'axespad', 'shadow']
+ proplist=[numpoints, pad, borderpad, markerscale, labelsep,
+ handlelen, handletextsep, axespad, shadow, scatteryoffsets]
+ propnames=['numpoints', 'pad', 'borderpad', 'markerscale', 'labelsep',
+ 'handlelen', 'handletextsep', 'axespad', 'shadow', 'scatteryoffsets']
for name, value in safezip(propnames,proplist):
if value is None:
value=rcParams["legend."+name]
@@ -134,6 +137,14 @@
self.prop=prop
self.fontsize = self.prop.get_size_in_points()
+ # introduce y-offset for handles of the scatter plot
+ if scatteryoffsets is None:
+ self._scatteryoffsets = np.array([4./8., 5./8., 3./8.])
+ else:
+ self._scatteryoffsets = np.asarray(scatteryoffsets)
+ reps = int(self.numpoints / len(self._scatteryoffsets)) + 1
+ self._scatteryoffsets = np.tile(self._scatteryoffsets, reps)[:self.numpoints]
+
if isinstance(parent,Axes):
self.isaxes = True
self.set_figure(parent.figure)
@@ -306,15 +317,26 @@
ret.append(legline)
elif isinstance(handle, RegularPolyCollection):
- if self.numpoints == 1:
- xdata = np.array([left])
- p = Rectangle(xy=(min(xdata), y-3/4*HEIGHT),
- width = self.handlelen, height=HEIGHT/2,
- )
- p.set_facecolor(handle._facecolors[0])
- if handle._edgecolors != 'none' and len(handle._edgecolors):
- p.set_edgecolor(handle._edgecolors[0])
- self._set_artist_props(p)
+ # the ydata values set here have no effects as it will
+ # be updated in the _update_positions() method.
+ ydata = (y-HEIGHT/2)*np.ones(np.asarray(xdata_marker).shape, float)
+
+ size_max, size_min = max(handle.get_sizes()),\
+ min(handle.get_sizes())
+ # we may need to scale these sizes by "markerscale"
+ # attribute. But other handle types does not seem
+ # to care about this attribute and it is currently ignored.
+ sizes = [.5*(size_max+size_min), size_max,
+ size_min]
+
+ p = type(handle)(handle.get_numsides(),
+ rotation=handle.get_rotation(),
+ sizes=sizes,
+ offsets=zip(xdata_marker,ydata),
+ transOffset=self.get_transform())
+
+ p.update_from(handle)
+ p.set_figure(self.figure)
p.set_clip_box(None)
p.set_clip_path(None)
ret.append(p)
@@ -532,6 +554,10 @@
elif isinstance(handle, Rectangle):
handle.set_y(y+1/4*h)
handle.set_height(h/2)
+ elif isinstance(handle,RegularPolyCollection):
+ offsets = handle.get_offsets()
+ offsets[:,1] = y+h*self._scatteryoffsets
+ handle.set_offsets(offsets)
# Set the data for the legend patch
bbox = self._get_handle_text_bbox(renderer)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2008-10-20 14:09:38
|
Revision: 6282
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6282&view=rev
Author: jdh2358
Date: 2008-10-20 14:09:30 +0000 (Mon, 20 Oct 2008)
Log Message:
-----------
added image.thumbnail function
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/doc/_static/logo_sidebar_horiz.png
trunk/matplotlib/examples/tests/backend_driver.py
trunk/matplotlib/lib/matplotlib/axes.py
trunk/matplotlib/lib/matplotlib/image.py
trunk/matplotlib/matplotlibrc.template
trunk/matplotlib/setupext.py
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2008-10-20 09:04:54 UTC (rev 6281)
+++ trunk/matplotlib/CHANGELOG 2008-10-20 14:09:30 UTC (rev 6282)
@@ -1,3 +1,7 @@
+2008-10-20 Added image thumbnail generating function
+ matplotlib.image.thumbnail. See
+ examples/misc/image_thumbnail.py - JDH
+
2008-10-20 Applied scatleg patch based on ideas and work by Erik
Tollerud and Jae-Joon Lee. - MM
Modified: trunk/matplotlib/doc/_static/logo_sidebar_horiz.png
===================================================================
(Binary files differ)
Modified: trunk/matplotlib/examples/tests/backend_driver.py
===================================================================
--- trunk/matplotlib/examples/tests/backend_driver.py 2008-10-20 09:04:54 UTC (rev 6281)
+++ trunk/matplotlib/examples/tests/backend_driver.py 2008-10-20 14:09:30 UTC (rev 6282)
@@ -28,7 +28,7 @@
'alignment_test.py',
'arctest.py',
'arrow_demo.py',
- 'auto_layout.py',
+ #'auto_layout.py',
'axes_demo.py',
'axhspan_demo.py',
'bar_stacked.py',
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py 2008-10-20 09:04:54 UTC (rev 6281)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2008-10-20 14:09:30 UTC (rev 6282)
@@ -5453,11 +5453,13 @@
If *None*, default to rc ``image.aspect`` value.
*interpolation*:
- Acceptable values are *None*, 'nearest', 'bilinear', 'bicubic',
- 'spline16', 'spline36', 'hanning', 'hamming', 'hermite', 'kaiser',
- 'quadric', 'catrom', 'gaussian', 'bessel', 'mitchell', 'sinc',
- 'lanczos', 'blackman'
+ Acceptable values are *None*, 'nearest', 'bilinear',
+ 'bicubic', 'spline16', 'spline36', 'hanning', 'hamming',
+ 'hermite', 'kaiser', 'quadric', 'catrom', 'gaussian',
+ 'bessel', 'mitchell', 'sinc', 'lanczos',
+
+
If *interpolation* is *None*, default to rc
``image.interpolation``. See also the *filternorm* and
*filterrad* parameters
Modified: trunk/matplotlib/lib/matplotlib/image.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/image.py 2008-10-20 09:04:54 UTC (rev 6281)
+++ trunk/matplotlib/lib/matplotlib/image.py 2008-10-20 14:09:30 UTC (rev 6282)
@@ -319,10 +319,9 @@
"""
Return the interpolation method the image uses when resizing.
- One of
-
- 'bicubic', 'bilinear', 'blackman100', 'blackman256', 'blackman64',
- 'nearest', 'sinc144', 'sinc256', 'sinc64', 'spline16', 'spline36'
+ One of 'nearest', 'bilinear', 'bicubic', 'spline16', 'spline36', 'hanning',
+ 'hamming', 'hermite', 'kaiser', 'quadric', 'catrom', 'gaussian',
+ 'bessel', 'mitchell', 'sinc', 'lanczos',
"""
return self._interpolation
@@ -330,9 +329,11 @@
"""
Set the interpolation method the image uses when resizing.
- ACCEPTS: ['bicubic' | 'bilinear' | 'blackman100' | 'blackman256' |
- 'blackman64', 'nearest' | 'sinc144' | 'sinc256' | 'sinc64' |
- 'spline16' | 'spline36']
+ ACCEPTS: ['nearest' | 'bilinear' | 'bicubic' | 'spline16' |
+ 'spline36' | 'hanning' | 'hamming' | 'hermite' | 'kaiser' |
+ 'quadric' | 'catrom' | 'gaussian' | 'bessel' | 'mitchell' |
+ 'sinc' | 'lanczos' | ]
+
"""
if s is None: s = rcParams['image.interpolation']
s = s.lower()
@@ -764,3 +765,100 @@
x = toarray(im)
x.shape = im.size[1], im.size[0], 4
return x
+
+def thumbnail(fname, scale=0.1, interpolation='bilinear', prefix='thumb_',
+ outdir=None, preview=False, extension='png'):
+ """
+ make a thumbnail of image in fname with output filename
+ [OUTDIR]/[PREFIX][BASENAME].EXTENSION where BASENAME is the
+ filename part of fname without the directory ar extension
+
+ *fname* the image file -- must be PNG or PIL readable if you
+ have `PIL <http://www.pythonware.com/products/pil/>`_ installed
+
+ *scale*
+ the scale factor for the thumbnail
+
+ *interpolation*
+ the interpolation scheme used in the resampling
+
+ *prefix*
+ the PREFIX of the output file name
+
+ *outdir*
+ the OUTDIR of the output filenamet - by default same as directory the source image lives in
+
+ *extension*
+ the EXTENSION for the output filename, one of 'png', 'pdf' or 'ps'
+
+ *preview*
+ if True, the default backend (presumably a user interface
+ backend) will be used which will cause a figure to be raised
+ if :func:`~matplotlib.pyplot.show` is called. If it is False,
+ a pure image backend will be used depending on the extension,
+ 'png'->FigureCanvasAgg, 'pdf'->FigureCanvasPDF,
+ 'svg'->FigureCanvasSVG
+
+
+ See examples/misc/image_thumbnail.py.
+
+ .. htmlonly::
+
+ :ref:`misc-image_thumbnail`
+
+ Return value is the output filename of the thumbnail
+
+ """
+
+ basedir, basename = os.path.split(fname)
+ if outdir is None:
+ if not basedir:
+ basedir = os.curdir
+ outdir = basedir
+
+ if not os.path.exists(outdir) or not os.path.isdir(outdir):
+ raise IOError('output directory "%s" must be a directory'%outdir)
+
+ im = imread(fname)
+ rows, cols, depth = im.shape
+
+ # this doesn't really matter, it will cancel in the end, but we
+ # need it for the mpl API
+ dpi = 100
+
+
+ height = float(rows)/dpi*scale
+ width = float(cols)/dpi*scale
+
+ extension = extension.lower()
+
+ if preview:
+ # let the UI backend do everything
+ import matplotlib.pyplot as plt
+ fig = plt.figure(figsize=(width, height), dpi=dpi)
+ else:
+ if extension=='png':
+ from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
+ from matplotlib.figure import Figure
+ elif extension=='pdf':
+ from matplotlib.backends.backend_pdf import FigureCanvasPDF as FigureCanvas
+ from matplotlib.figure import Figure
+ elif extension=='svg':
+ from matplotlib.backends.backend_svg import FigureCanvasSVG as FigureCanvas
+ from matplotlib.figure import Figure
+ else:
+ raise ValueError("Can only handle extension 'png', 'svg' or 'pdf'")
+
+ fig = Figure(figsize=(width, height), dpi=dpi)
+ canvas = FigureCanvas(fig)
+
+
+
+
+ ax = fig.add_axes([0,0,1,1], aspect='auto', frameon=False, xticks=[], yticks=[])
+
+ basename, ext = os.path.splitext(basename)
+ ax.imshow(im, aspect='auto', resample=True, interpolation='bilinear')
+ outfile = os.path.join(outdir, '%s%s.%s'%(prefix, basename, extension))
+ fig.savefig(outfile, dpi=dpi)
+ return outfile
Modified: trunk/matplotlib/matplotlibrc.template
===================================================================
--- trunk/matplotlib/matplotlibrc.template 2008-10-20 09:04:54 UTC (rev 6281)
+++ trunk/matplotlib/matplotlibrc.template 2008-10-20 14:09:30 UTC (rev 6282)
@@ -265,8 +265,8 @@
#image.cmap : jet # gray | jet etc...
#image.lut : 256 # the size of the colormap lookup table
#image.origin : upper # lower | upper
+#image.resample : False
-
### CONTOUR PLOTS
#contour.negative_linestyle : dashed # dashed | solid
Modified: trunk/matplotlib/setupext.py
===================================================================
--- trunk/matplotlib/setupext.py 2008-10-20 09:04:54 UTC (rev 6281)
+++ trunk/matplotlib/setupext.py 2008-10-20 14:09:30 UTC (rev 6282)
@@ -942,6 +942,7 @@
try:
tcl_lib = tcl_vars.get("default", "TCL_LIB_SPEC")[1:-1].split()[0][2:]
tcl_inc = tcl_vars.get("default", "TCL_INCLUDE_SPEC")[3:-1]
+
tk_lib = tk_vars.get("default", "TK_LIB_SPEC")[1:-1].split()[0][2:]
if tk_vars.has_option("default", "TK_INCLUDE_SPEC"):
# On Ubuntu 8.04
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2008-10-21 14:37:02
|
Revision: 6286
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6286&view=rev
Author: jdh2358
Date: 2008-10-21 14:36:53 +0000 (Tue, 21 Oct 2008)
Log Message:
-----------
fixed rcsetup to respect external module backends
Modified Paths:
--------------
trunk/matplotlib/examples/misc/image_thumbnail.py
trunk/matplotlib/lib/matplotlib/image.py
trunk/matplotlib/lib/matplotlib/rcsetup.py
Modified: trunk/matplotlib/examples/misc/image_thumbnail.py
===================================================================
--- trunk/matplotlib/examples/misc/image_thumbnail.py 2008-10-20 20:54:24 UTC (rev 6285)
+++ trunk/matplotlib/examples/misc/image_thumbnail.py 2008-10-21 14:36:53 UTC (rev 6286)
@@ -13,7 +13,7 @@
print 'Usage: python %s IMAGEDIR'%__file__
raise SystemExit
indir = sys.argv[1]
-if not os.path.exists(indir):
+if not os.path.isdir(indir):
print 'Could not find input directory "%s"'%indir
raise SystemExit
Modified: trunk/matplotlib/lib/matplotlib/image.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/image.py 2008-10-20 20:54:24 UTC (rev 6285)
+++ trunk/matplotlib/lib/matplotlib/image.py 2008-10-21 14:36:53 UTC (rev 6286)
@@ -846,22 +846,17 @@
else:
if extension=='png':
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
- from matplotlib.figure import Figure
elif extension=='pdf':
from matplotlib.backends.backend_pdf import FigureCanvasPDF as FigureCanvas
- from matplotlib.figure import Figure
elif extension=='svg':
from matplotlib.backends.backend_svg import FigureCanvasSVG as FigureCanvas
- from matplotlib.figure import Figure
else:
raise ValueError("Can only handle extension 'png', 'svg' or 'pdf'")
+ from matplotlib.figure import Figure
fig = Figure(figsize=(width, height), dpi=dpi)
canvas = FigureCanvas(fig)
-
-
-
ax = fig.add_axes([0,0,1,1], aspect='auto', frameon=False, xticks=[], yticks=[])
basename, ext = os.path.splitext(basename)
Modified: trunk/matplotlib/lib/matplotlib/rcsetup.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/rcsetup.py 2008-10-20 20:54:24 UTC (rev 6285)
+++ trunk/matplotlib/lib/matplotlib/rcsetup.py 2008-10-21 14:36:53 UTC (rev 6286)
@@ -100,7 +100,11 @@
raise ValueError('Supported Postscript/PDF font types are %s' % fonttypes.values())
return fonttype
-validate_backend = ValidateInStrings('backend', all_backends, ignorecase=True)
+#validate_backend = ValidateInStrings('backend', all_backends, ignorecase=True)
+_validate_standard_backends = ValidateInStrings('backend', all_backends, ignorecase=True)
+def validate_backend(s):
+ if s.startswith('module://'): return s
+ else: return _validate_standard_backends(s)
validate_numerix = ValidateInStrings('numerix',[
'Numeric','numarray','numpy',
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2008-10-21 14:53:10
|
Revision: 6287
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6287&view=rev
Author: jdh2358
Date: 2008-10-21 14:52:59 +0000 (Tue, 21 Oct 2008)
Log Message:
-----------
cleaned up output of mathmpl and plot directive; added thumbnail gallery
Modified Paths:
--------------
trunk/matplotlib/doc/_templates/index.html
trunk/matplotlib/doc/_templates/layout.html
trunk/matplotlib/doc/conf.py
trunk/matplotlib/doc/devel/coding_guide.rst
trunk/matplotlib/doc/examples/gen_rst.py
trunk/matplotlib/doc/faq/environment_variables_faq.rst
trunk/matplotlib/doc/faq/installing_faq.rst
trunk/matplotlib/doc/make.py
trunk/matplotlib/doc/sphinxext/mathmpl.py
trunk/matplotlib/doc/sphinxext/plot_directive.py
trunk/matplotlib/doc/users/screenshots.rst
trunk/matplotlib/doc/users/usetex.rst
trunk/matplotlib/examples/pylab_examples/polar_demo.py
trunk/matplotlib/lib/matplotlib/cbook.py
trunk/matplotlib/lib/matplotlib/image.py
Added Paths:
-----------
trunk/matplotlib/doc/_templates/gallery.html
trunk/matplotlib/doc/_templates/gen_gallery.py
Added: trunk/matplotlib/doc/_templates/gallery.html
===================================================================
--- trunk/matplotlib/doc/_templates/gallery.html (rev 0)
+++ trunk/matplotlib/doc/_templates/gallery.html 2008-10-21 14:52:59 UTC (rev 6287)
@@ -0,0 +1,498 @@
+{% extends "layout.html" %}
+{% set title = "Thumbnail gallery" %}
+
+
+{% block body %}
+
+<h3>Click on any image to see full size image and source code</h3>
+<br>
+
+<a href="examples/api/barchart_demo.html"><img src="_static/plot_directive/mpl_examples/api/thumbnails/barchart_demo.png" border="0" alt="barchart_demo"/></a>
+
+<a href="examples/api/bbox_intersect.html"><img src="_static/plot_directive/mpl_examples/api/thumbnails/bbox_intersect.png" border="0" alt="bbox_intersect"/></a>
+
+<a href="examples/api/collections_demo.html"><img src="_static/plot_directive/mpl_examples/api/thumbnails/collections_demo.png" border="0" alt="collections_demo"/></a>
+
+<a href="examples/api/color_cycle.html"><img src="_static/plot_directive/mpl_examples/api/thumbnails/color_cycle.png" border="0" alt="color_cycle"/></a>
+
+<a href="examples/api/colorbar_only.html"><img src="_static/plot_directive/mpl_examples/api/thumbnails/colorbar_only.png" border="0" alt="colorbar_only"/></a>
+
+<a href="examples/api/custom_projection_example.html"><img src="_static/plot_directive/mpl_examples/api/thumbnails/custom_projection_example.png" border="0" alt="custom_projection_example"/></a>
+
+<a href="examples/api/custom_scale_example.html"><img src="_static/plot_directive/mpl_examples/api/thumbnails/custom_scale_example.png" border="0" alt="custom_scale_example"/></a>
+
+<a href="examples/api/date_demo.html"><img src="_static/plot_directive/mpl_examples/api/thumbnails/date_demo.png" border="0" alt="date_demo"/></a>
+
+<a href="examples/api/date_index_formatter.html"><img src="_static/plot_directive/mpl_examples/api/thumbnails/date_index_formatter.png" border="0" alt="date_index_formatter"/></a>
+
+<a href="examples/api/date_index_formatter.html"><img src="_static/plot_directive/mpl_examples/api/thumbnails/date_index_formatter_01.png" border="0" alt="date_index_formatter"/></a>
+
+<a href="examples/api/donut_demo.html"><img src="_static/plot_directive/mpl_examples/api/thumbnails/donut_demo.png" border="0" alt="donut_demo"/></a>
+
+<a href="examples/api/histogram_demo.html"><img src="_static/plot_directive/mpl_examples/api/thumbnails/histogram_demo.png" border="0" alt="histogram_demo"/></a>
+
+<a href="examples/api/image_zcoord.html"><img src="_static/plot_directive/mpl_examples/api/thumbnails/image_zcoord.png" border="0" alt="image_zcoord"/></a>
+
+<a href="examples/api/legend_demo.html"><img src="_static/plot_directive/mpl_examples/api/thumbnails/legend_demo.png" border="0" alt="legend_demo"/></a>
+
+<a href="examples/api/line_with_text.html"><img src="_static/plot_directive/mpl_examples/api/thumbnails/line_with_text.png" border="0" alt="line_with_text"/></a>
+
+<a href="examples/api/logo2.html"><img src="_static/plot_directive/mpl_examples/api/thumbnails/logo2.png" border="0" alt="logo2"/></a>
+
+<a href="examples/api/mathtext_asarray.html"><img src="_static/plot_directive/mpl_examples/api/thumbnails/mathtext_asarray.png" border="0" alt="mathtext_asarray"/></a>
+
+<a href="examples/api/patch_collection.html"><img src="_static/plot_directive/mpl_examples/api/thumbnails/patch_collection.png" border="0" alt="patch_collection"/></a>
+
+<a href="examples/api/path_patch_demo.html"><img src="_static/plot_directive/mpl_examples/api/thumbnails/path_patch_demo.png" border="0" alt="path_patch_demo"/></a>
+
+<a href="examples/api/quad_bezier.html"><img src="_static/plot_directive/mpl_examples/api/thumbnails/quad_bezier.png" border="0" alt="quad_bezier"/></a>
+
+<a href="examples/api/scatter_piecharts.html"><img src="_static/plot_directive/mpl_examples/api/thumbnails/scatter_piecharts.png" border="0" alt="scatter_piecharts"/></a>
+
+<a href="examples/api/two_scales.html"><img src="_static/plot_directive/mpl_examples/api/thumbnails/two_scales.png" border="0" alt="two_scales"/></a>
+
+<a href="examples/api/watermark_image.html"><img src="_static/plot_directive/mpl_examples/api/thumbnails/watermark_image.png" border="0" alt="watermark_image"/></a>
+
+<a href="examples/api/watermark_text.html"><img src="_static/plot_directive/mpl_examples/api/thumbnails/watermark_text.png" border="0" alt="watermark_text"/></a>
+
+<a href="examples/pylab_examples/accented_text.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/accented_text.png" border="0" alt="accented_text"/></a>
+
+<a href="examples/pylab_examples/agg_buffer_to_array.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/agg_buffer_to_array.png" border="0" alt="agg_buffer_to_array"/></a>
+
+<a href="examples/pylab_examples/agg_buffer_to_array.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/agg_buffer_to_array_01.png" border="0" alt="agg_buffer_to_array"/></a>
+
+<a href="examples/pylab_examples/alignment_test.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/alignment_test.png" border="0" alt="alignment_test"/></a>
+
+<a href="examples/pylab_examples/annotation_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/annotation_demo.png" border="0" alt="annotation_demo"/></a>
+
+<a href="examples/pylab_examples/annotation_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/annotation_demo_01.png" border="0" alt="annotation_demo"/></a>
+
+<a href="examples/pylab_examples/annotation_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/annotation_demo_02.png" border="0" alt="annotation_demo"/></a>
+
+<a href="examples/pylab_examples/anscombe.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/anscombe.png" border="0" alt="anscombe"/></a>
+
+<a href="examples/pylab_examples/arctest.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/arctest.png" border="0" alt="arctest"/></a>
+
+<a href="examples/pylab_examples/arrow_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/arrow_demo.png" border="0" alt="arrow_demo"/></a>
+
+<a href="examples/pylab_examples/axes_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/axes_demo.png" border="0" alt="axes_demo"/></a>
+
+<a href="examples/pylab_examples/axes_props.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/axes_props.png" border="0" alt="axes_props"/></a>
+
+<a href="examples/pylab_examples/axhspan_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/axhspan_demo.png" border="0" alt="axhspan_demo"/></a>
+
+<a href="examples/pylab_examples/axis_equal_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/axis_equal_demo.png" border="0" alt="axis_equal_demo"/></a>
+
+<a href="examples/pylab_examples/bar_stacked.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/bar_stacked.png" border="0" alt="bar_stacked"/></a>
+
+<a href="examples/pylab_examples/barb_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/barb_demo.png" border="0" alt="barb_demo"/></a>
+
+<a href="examples/pylab_examples/barchart_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/barchart_demo.png" border="0" alt="barchart_demo"/></a>
+
+<a href="examples/pylab_examples/barcode_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/barcode_demo.png" border="0" alt="barcode_demo"/></a>
+
+<a href="examples/pylab_examples/barh_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/barh_demo.png" border="0" alt="barh_demo"/></a>
+
+<a href="examples/pylab_examples/barh_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/barh_demo_01.png" border="0" alt="barh_demo"/></a>
+
+<a href="examples/pylab_examples/boxplot_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/boxplot_demo.png" border="0" alt="boxplot_demo"/></a>
+
+<a href="examples/pylab_examples/boxplot_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/boxplot_demo_01.png" border="0" alt="boxplot_demo"/></a>
+
+<a href="examples/pylab_examples/boxplot_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/boxplot_demo_02.png" border="0" alt="boxplot_demo"/></a>
+
+<a href="examples/pylab_examples/boxplot_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/boxplot_demo_03.png" border="0" alt="boxplot_demo"/></a>
+
+<a href="examples/pylab_examples/boxplot_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/boxplot_demo_04.png" border="0" alt="boxplot_demo"/></a>
+
+<a href="examples/pylab_examples/boxplot_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/boxplot_demo_05.png" border="0" alt="boxplot_demo"/></a>
+
+<a href="examples/pylab_examples/boxplot_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/boxplot_demo_06.png" border="0" alt="boxplot_demo"/></a>
+
+<a href="examples/pylab_examples/break.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/break.png" border="0" alt="break"/></a>
+
+<a href="examples/pylab_examples/broken_barh.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/broken_barh.png" border="0" alt="broken_barh"/></a>
+
+<a href="examples/pylab_examples/clippedline.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/clippedline.png" border="0" alt="clippedline"/></a>
+
+<a href="examples/pylab_examples/cohere_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/cohere_demo.png" border="0" alt="cohere_demo"/></a>
+
+<a href="examples/pylab_examples/color_by_yvalue.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/color_by_yvalue.png" border="0" alt="color_by_yvalue"/></a>
+
+<a href="examples/pylab_examples/color_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/color_demo.png" border="0" alt="color_demo"/></a>
+
+<a href="examples/pylab_examples/contour_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_demo.png" border="0" alt="contour_demo"/></a>
+
+<a href="examples/pylab_examples/contour_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_demo_01.png" border="0" alt="contour_demo"/></a>
+
+<a href="examples/pylab_examples/contour_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_demo_02.png" border="0" alt="contour_demo"/></a>
+
+<a href="examples/pylab_examples/contour_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_demo_03.png" border="0" alt="contour_demo"/></a>
+
+<a href="examples/pylab_examples/contour_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_demo_04.png" border="0" alt="contour_demo"/></a>
+
+<a href="examples/pylab_examples/contour_image.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_image.png" border="0" alt="contour_image"/></a>
+
+<a href="examples/pylab_examples/contour_label_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_label_demo.png" border="0" alt="contour_label_demo"/></a>
+
+<a href="examples/pylab_examples/contour_label_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_label_demo_01.png" border="0" alt="contour_label_demo"/></a>
+
+<a href="examples/pylab_examples/contourf_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/contourf_demo.png" border="0" alt="contourf_demo"/></a>
+
+<a href="examples/pylab_examples/contourf_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/contourf_demo_01.png" border="0" alt="contourf_demo"/></a>
+
+<a href="examples/pylab_examples/contourf_log.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/contourf_log.png" border="0" alt="contourf_log"/></a>
+
+<a href="examples/pylab_examples/coords_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/coords_demo.png" border="0" alt="coords_demo"/></a>
+
+<a href="examples/pylab_examples/coords_report.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/coords_report.png" border="0" alt="coords_report"/></a>
+
+<a href="examples/pylab_examples/csd_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/csd_demo.png" border="0" alt="csd_demo"/></a>
+
+<a href="examples/pylab_examples/custom_figure_class.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/custom_figure_class.png" border="0" alt="custom_figure_class"/></a>
+
+<a href="examples/pylab_examples/custom_ticker1.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/custom_ticker1.png" border="0" alt="custom_ticker1"/></a>
+
+<a href="examples/pylab_examples/customize_rc.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/customize_rc.png" border="0" alt="customize_rc"/></a>
+
+<a href="examples/pylab_examples/dannys_example.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/dannys_example.png" border="0" alt="dannys_example"/></a>
+
+<a href="examples/pylab_examples/dash_control.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/dash_control.png" border="0" alt="dash_control"/></a>
+
+<a href="examples/pylab_examples/dashpointlabel.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/dashpointlabel.png" border="0" alt="dashpointlabel"/></a>
+
+<a href="examples/pylab_examples/date_demo1.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/date_demo1.png" border="0" alt="date_demo1"/></a>
+
+<a href="examples/pylab_examples/date_demo2.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/date_demo2.png" border="0" alt="date_demo2"/></a>
+
+<a href="examples/pylab_examples/date_demo_convert.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/date_demo_convert.png" border="0" alt="date_demo_convert"/></a>
+
+<a href="examples/pylab_examples/date_demo_rrule.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/date_demo_rrule.png" border="0" alt="date_demo_rrule"/></a>
+
+<a href="examples/pylab_examples/date_index_formatter.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/date_index_formatter.png" border="0" alt="date_index_formatter"/></a>
+
+<a href="examples/pylab_examples/dolphin.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/dolphin.png" border="0" alt="dolphin"/></a>
+
+<a href="examples/pylab_examples/ellipse_collection.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/ellipse_collection.png" border="0" alt="ellipse_collection"/></a>
+
+<a href="examples/pylab_examples/ellipse_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/ellipse_demo.png" border="0" alt="ellipse_demo"/></a>
+
+<a href="examples/pylab_examples/ellipse_rotated.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/ellipse_rotated.png" border="0" alt="ellipse_rotated"/></a>
+
+<a href="examples/pylab_examples/equal_aspect_ratio.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/equal_aspect_ratio.png" border="0" alt="equal_aspect_ratio"/></a>
+
+<a href="examples/pylab_examples/errorbar_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/errorbar_demo.png" border="0" alt="errorbar_demo"/></a>
+
+<a href="examples/pylab_examples/errorbar_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/errorbar_demo_01.png" border="0" alt="errorbar_demo"/></a>
+
+<a href="examples/pylab_examples/errorbar_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/errorbar_demo_02.png" border="0" alt="errorbar_demo"/></a>
+
+<a href="examples/pylab_examples/errorbar_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/errorbar_demo_03.png" border="0" alt="errorbar_demo"/></a>
+
+<a href="examples/pylab_examples/errorbar_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/errorbar_demo_04.png" border="0" alt="errorbar_demo"/></a>
+
+<a href="examples/pylab_examples/errorbar_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/errorbar_demo_05.png" border="0" alt="errorbar_demo"/></a>
+
+<a href="examples/pylab_examples/errorbar_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/errorbar_demo_06.png" border="0" alt="errorbar_demo"/></a>
+
+<a href="examples/pylab_examples/errorbar_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/errorbar_demo_07.png" border="0" alt="errorbar_demo"/></a>
+
+<a href="examples/pylab_examples/errorbar_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/errorbar_demo_08.png" border="0" alt="errorbar_demo"/></a>
+
+<a href="examples/pylab_examples/errorbar_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/errorbar_demo_09.png" border="0" alt="errorbar_demo"/></a>
+
+<a href="examples/pylab_examples/errorbar_limits.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/errorbar_limits.png" border="0" alt="errorbar_limits"/></a>
+
+<a href="examples/pylab_examples/errorbar_limits.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/errorbar_limits_01.png" border="0" alt="errorbar_limits"/></a>
+
+<a href="examples/pylab_examples/fancybox_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/fancybox_demo.png" border="0" alt="fancybox_demo"/></a>
+
+<a href="examples/pylab_examples/fancytextbox_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/fancytextbox_demo.png" border="0" alt="fancytextbox_demo"/></a>
+
+<a href="examples/pylab_examples/figimage_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/figimage_demo.png" border="0" alt="figimage_demo"/></a>
+
+<a href="examples/pylab_examples/figlegend_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/figlegend_demo.png" border="0" alt="figlegend_demo"/></a>
+
+<a href="examples/pylab_examples/figure_title.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/figure_title.png" border="0" alt="figure_title"/></a>
+
+<a href="examples/pylab_examples/fill_between.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/fill_between.png" border="0" alt="fill_between"/></a>
+
+<a href="examples/pylab_examples/fill_between_posneg.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/fill_between_posneg.png" border="0" alt="fill_between_posneg"/></a>
+
+<a href="examples/pylab_examples/fill_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/fill_demo.png" border="0" alt="fill_demo"/></a>
+
+<a href="examples/pylab_examples/fill_demo2.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/fill_demo2.png" border="0" alt="fill_demo2"/></a>
+
+<a href="examples/pylab_examples/fill_spiral.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/fill_spiral.png" border="0" alt="fill_spiral"/></a>
+
+<a href="examples/pylab_examples/finance_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/finance_demo.png" border="0" alt="finance_demo"/></a>
+
+<a href="examples/pylab_examples/finance_work2.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/finance_work2.png" border="0" alt="finance_work2"/></a>
+
+<a href="examples/pylab_examples/findobj_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/findobj_demo.png" border="0" alt="findobj_demo"/></a>
+
+<a href="examples/pylab_examples/fonts_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/fonts_demo.png" border="0" alt="fonts_demo"/></a>
+
+<a href="examples/pylab_examples/fonts_demo_kw.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/fonts_demo_kw.png" border="0" alt="fonts_demo_kw"/></a>
+
+<a href="examples/pylab_examples/ganged_plots.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/ganged_plots.png" border="0" alt="ganged_plots"/></a>
+
+<a href="examples/pylab_examples/geo_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/geo_demo.png" border="0" alt="geo_demo"/></a>
+
+<a href="examples/pylab_examples/gradient_bar.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/gradient_bar.png" border="0" alt="gradient_bar"/></a>
+
+<a href="examples/pylab_examples/griddata_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/griddata_demo.png" border="0" alt="griddata_demo"/></a>
+
+<a href="examples/pylab_examples/hatch_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/hatch_demo.png" border="0" alt="hatch_demo"/></a>
+
+<a href="examples/pylab_examples/hexbin_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/hexbin_demo.png" border="0" alt="hexbin_demo"/></a>
+
+<a href="examples/pylab_examples/hexbin_demo2.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/hexbin_demo2.png" border="0" alt="hexbin_demo2"/></a>
+
+<a href="examples/pylab_examples/hist_colormapped.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/hist_colormapped.png" border="0" alt="hist_colormapped"/></a>
+
+<a href="examples/pylab_examples/histogram_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo.png" border="0" alt="histogram_demo"/></a>
+
+<a href="examples/pylab_examples/histogram_demo_extended.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended.png" border="0" alt="histogram_demo_extended"/></a>
+
+<a href="examples/pylab_examples/histogram_demo_extended.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_01.png" border="0" alt="histogram_demo_extended"/></a>
+
+<a href="examples/pylab_examples/histogram_demo_extended.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_02.png" border="0" alt="histogram_demo_extended"/></a>
+
+<a href="examples/pylab_examples/histogram_demo_extended.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_03.png" border="0" alt="histogram_demo_extended"/></a>
+
+<a href="examples/pylab_examples/histogram_demo_extended.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_04.png" border="0" alt="histogram_demo_extended"/></a>
+
+<a href="examples/pylab_examples/histogram_demo_extended.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_05.png" border="0" alt="histogram_demo_extended"/></a>
+
+<a href="examples/pylab_examples/hline_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/hline_demo.png" border="0" alt="hline_demo"/></a>
+
+<a href="examples/pylab_examples/image_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/image_demo.png" border="0" alt="image_demo"/></a>
+
+<a href="examples/pylab_examples/image_demo2.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/image_demo2.png" border="0" alt="image_demo2"/></a>
+
+<a href="examples/pylab_examples/image_demo3.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/image_demo3.png" border="0" alt="image_demo3"/></a>
+
+<a href="examples/pylab_examples/image_interp.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/image_interp.png" border="0" alt="image_interp"/></a>
+
+<a href="examples/pylab_examples/image_interp.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/image_interp_01.png" border="0" alt="image_interp"/></a>
+
+<a href="examples/pylab_examples/image_interp.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/image_interp_02.png" border="0" alt="image_interp"/></a>
+
+<a href="examples/pylab_examples/image_masked.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/image_masked.png" border="0" alt="image_masked"/></a>
+
+<a href="examples/pylab_examples/image_nonuniform.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/image_nonuniform.png" border="0" alt="image_nonuniform"/></a>
+
+<a href="examples/pylab_examples/image_origin.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/image_origin.png" border="0" alt="image_origin"/></a>
+
+<a href="examples/pylab_examples/image_slices_viewer.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/image_slices_viewer.png" border="0" alt="image_slices_viewer"/></a>
+
+<a href="examples/pylab_examples/integral_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/integral_demo.png" border="0" alt="integral_demo"/></a>
+
+<a href="examples/pylab_examples/interp_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/interp_demo.png" border="0" alt="interp_demo"/></a>
+
+<a href="examples/pylab_examples/invert_axes.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/invert_axes.png" border="0" alt="invert_axes"/></a>
+
+<a href="examples/pylab_examples/layer_images.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/layer_images.png" border="0" alt="layer_images"/></a>
+
+<a href="examples/pylab_examples/legend_auto.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto.png" border="0" alt="legend_auto"/></a>
+
+<a href="examples/pylab_examples/legend_auto.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_01.png" border="0" alt="legend_auto"/></a>
+
+<a href="examples/pylab_examples/legend_auto.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_02.png" border="0" alt="legend_auto"/></a>
+
+<a href="examples/pylab_examples/legend_auto.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_03.png" border="0" alt="legend_auto"/></a>
+
+<a href="examples/pylab_examples/legend_auto.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_04.png" border="0" alt="legend_auto"/></a>
+
+<a href="examples/pylab_examples/legend_auto.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_05.png" border="0" alt="legend_auto"/></a>
+
+<a href="examples/pylab_examples/legend_auto.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_06.png" border="0" alt="legend_auto"/></a>
+
+<a href="examples/pylab_examples/legend_auto.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_07.png" border="0" alt="legend_auto"/></a>
+
+<a href="examples/pylab_examples/legend_auto.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_08.png" border="0" alt="legend_auto"/></a>
+
+<a href="examples/pylab_examples/legend_auto.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_09.png" border="0" alt="legend_auto"/></a>
+
+<a href="examples/pylab_examples/legend_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_demo.png" border="0" alt="legend_demo"/></a>
+
+<a href="examples/pylab_examples/legend_demo2.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_demo2.png" border="0" alt="legend_demo2"/></a>
+
+<a href="examples/pylab_examples/legend_scatter.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_scatter.png" border="0" alt="legend_scatter"/></a>
+
+<a href="examples/pylab_examples/line_collection.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/line_collection.png" border="0" alt="line_collection"/></a>
+
+<a href="exampl...
[truncated message content] |
|
From: <jd...@us...> - 2008-10-21 15:26:39
|
Revision: 6288
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6288&view=rev
Author: jdh2358
Date: 2008-10-21 15:26:22 +0000 (Tue, 21 Oct 2008)
Log Message:
-----------
restored the support for multiple pyplots that I broke earlier
Modified Paths:
--------------
trunk/matplotlib/API_CHANGES
trunk/matplotlib/CHANGELOG
trunk/matplotlib/doc/_templates/gallery.html
trunk/matplotlib/doc/make.py
trunk/matplotlib/doc/sphinxext/plot_directive.py
trunk/matplotlib/lib/matplotlib/axes.py
Modified: trunk/matplotlib/API_CHANGES
===================================================================
--- trunk/matplotlib/API_CHANGES 2008-10-21 14:52:59 UTC (rev 6287)
+++ trunk/matplotlib/API_CHANGES 2008-10-21 15:26:22 UTC (rev 6288)
@@ -1,7 +1,9 @@
-
Changes for 0.98.x
==================
-
+
+* Restored 0.91 behavior of get_xlim/ylim returning a tuple
+ rather than array - JDH
+
* AFM.get_fullname() and get_familyname() no longer raise an
exception if the AFM file does not specify these optional attributes,
but returns a guess based on the required FontName attribute.
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2008-10-21 14:52:59 UTC (rev 6287)
+++ trunk/matplotlib/CHANGELOG 2008-10-21 15:26:22 UTC (rev 6288)
@@ -1,3 +1,6 @@
+2008-10-21 Restored 0.91 behavior of get_xlim/ylim returning a tuple
+ rather than array - JDH
+
2008-10-20 Added image thumbnail generating function
matplotlib.image.thumbnail. See
examples/misc/image_thumbnail.py - JDH
@@ -5,8 +8,8 @@
2008-10-20 Applied scatleg patch based on ideas and work by Erik
Tollerud and Jae-Joon Lee. - MM
-2008-10-11 Fixed bug in pdf backend: if you pass a file object for
- output instead of a filename, e.g. in a wep app, we now
+2008-10-11 Fixed bug in pdf backend: if you pass a file object for
+ output instead of a filename, e.g. in a wep app, we now
flush the object at the end. - JKS
2008-10-08 Add path simplification support to paths with gaps. - EF
Modified: trunk/matplotlib/doc/_templates/gallery.html
===================================================================
--- trunk/matplotlib/doc/_templates/gallery.html 2008-10-21 14:52:59 UTC (rev 6287)
+++ trunk/matplotlib/doc/_templates/gallery.html 2008-10-21 15:26:22 UTC (rev 6288)
@@ -23,7 +23,7 @@
<a href="examples/api/date_demo.html"><img src="_static/plot_directive/mpl_examples/api/thumbnails/date_demo.png" border="0" alt="date_demo"/></a>
-<a href="examples/api/date_index_formatter.html"><img src="_static/plot_directive/mpl_examples/api/thumbnails/date_index_formatter.png" border="0" alt="date_index_formatter"/></a>
+<a href="examples/api/date_index_formatter.html"><img src="_static/plot_directive/mpl_examples/api/thumbnails/date_index_formatter_00.png" border="0" alt="date_index_formatter"/></a>
<a href="examples/api/date_index_formatter.html"><img src="_static/plot_directive/mpl_examples/api/thumbnails/date_index_formatter_01.png" border="0" alt="date_index_formatter"/></a>
@@ -57,13 +57,13 @@
<a href="examples/pylab_examples/accented_text.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/accented_text.png" border="0" alt="accented_text"/></a>
-<a href="examples/pylab_examples/agg_buffer_to_array.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/agg_buffer_to_array.png" border="0" alt="agg_buffer_to_array"/></a>
+<a href="examples/pylab_examples/agg_buffer_to_array.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/agg_buffer_to_array_00.png" border="0" alt="agg_buffer_to_array"/></a>
<a href="examples/pylab_examples/agg_buffer_to_array.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/agg_buffer_to_array_01.png" border="0" alt="agg_buffer_to_array"/></a>
<a href="examples/pylab_examples/alignment_test.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/alignment_test.png" border="0" alt="alignment_test"/></a>
-<a href="examples/pylab_examples/annotation_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/annotation_demo.png" border="0" alt="annotation_demo"/></a>
+<a href="examples/pylab_examples/annotation_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/annotation_demo_00.png" border="0" alt="annotation_demo"/></a>
<a href="examples/pylab_examples/annotation_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/annotation_demo_01.png" border="0" alt="annotation_demo"/></a>
@@ -91,11 +91,11 @@
<a href="examples/pylab_examples/barcode_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/barcode_demo.png" border="0" alt="barcode_demo"/></a>
-<a href="examples/pylab_examples/barh_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/barh_demo.png" border="0" alt="barh_demo"/></a>
+<a href="examples/pylab_examples/barh_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/barh_demo_00.png" border="0" alt="barh_demo"/></a>
<a href="examples/pylab_examples/barh_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/barh_demo_01.png" border="0" alt="barh_demo"/></a>
-<a href="examples/pylab_examples/boxplot_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/boxplot_demo.png" border="0" alt="boxplot_demo"/></a>
+<a href="examples/pylab_examples/boxplot_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/boxplot_demo_00.png" border="0" alt="boxplot_demo"/></a>
<a href="examples/pylab_examples/boxplot_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/boxplot_demo_01.png" border="0" alt="boxplot_demo"/></a>
@@ -121,7 +121,7 @@
<a href="examples/pylab_examples/color_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/color_demo.png" border="0" alt="color_demo"/></a>
-<a href="examples/pylab_examples/contour_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_demo.png" border="0" alt="contour_demo"/></a>
+<a href="examples/pylab_examples/contour_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_demo_00.png" border="0" alt="contour_demo"/></a>
<a href="examples/pylab_examples/contour_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_demo_01.png" border="0" alt="contour_demo"/></a>
@@ -133,11 +133,11 @@
<a href="examples/pylab_examples/contour_image.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_image.png" border="0" alt="contour_image"/></a>
-<a href="examples/pylab_examples/contour_label_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_label_demo.png" border="0" alt="contour_label_demo"/></a>
+<a href="examples/pylab_examples/contour_label_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_label_demo_00.png" border="0" alt="contour_label_demo"/></a>
<a href="examples/pylab_examples/contour_label_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_label_demo_01.png" border="0" alt="contour_label_demo"/></a>
-<a href="examples/pylab_examples/contourf_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/contourf_demo.png" border="0" alt="contourf_demo"/></a>
+<a href="examples/pylab_examples/contourf_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/contourf_demo_00.png" border="0" alt="contourf_demo"/></a>
<a href="examples/pylab_examples/contourf_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/contourf_demo_01.png" border="0" alt="contourf_demo"/></a>
@@ -181,7 +181,7 @@
<a href="examples/pylab_examples/equal_aspect_ratio.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/equal_aspect_ratio.png" border="0" alt="equal_aspect_ratio"/></a>
-<a href="examples/pylab_examples/errorbar_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/errorbar_demo.png" border="0" alt="errorbar_demo"/></a>
+<a href="examples/pylab_examples/errorbar_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/errorbar_demo_00.png" border="0" alt="errorbar_demo"/></a>
<a href="examples/pylab_examples/errorbar_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/errorbar_demo_01.png" border="0" alt="errorbar_demo"/></a>
@@ -201,7 +201,7 @@
<a href="examples/pylab_examples/errorbar_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/errorbar_demo_09.png" border="0" alt="errorbar_demo"/></a>
-<a href="examples/pylab_examples/errorbar_limits.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/errorbar_limits.png" border="0" alt="errorbar_limits"/></a>
+<a href="examples/pylab_examples/errorbar_limits.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/errorbar_limits_00.png" border="0" alt="errorbar_limits"/></a>
<a href="examples/pylab_examples/errorbar_limits.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/errorbar_limits_01.png" border="0" alt="errorbar_limits"/></a>
@@ -253,7 +253,7 @@
<a href="examples/pylab_examples/histogram_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo.png" border="0" alt="histogram_demo"/></a>
-<a href="examples/pylab_examples/histogram_demo_extended.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended.png" border="0" alt="histogram_demo_extended"/></a>
+<a href="examples/pylab_examples/histogram_demo_extended.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_00.png" border="0" alt="histogram_demo_extended"/></a>
<a href="examples/pylab_examples/histogram_demo_extended.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_01.png" border="0" alt="histogram_demo_extended"/></a>
@@ -273,7 +273,7 @@
<a href="examples/pylab_examples/image_demo3.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/image_demo3.png" border="0" alt="image_demo3"/></a>
-<a href="examples/pylab_examples/image_interp.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/image_interp.png" border="0" alt="image_interp"/></a>
+<a href="examples/pylab_examples/image_interp.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/image_interp_00.png" border="0" alt="image_interp"/></a>
<a href="examples/pylab_examples/image_interp.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/image_interp_01.png" border="0" alt="image_interp"/></a>
@@ -295,7 +295,7 @@
<a href="examples/pylab_examples/layer_images.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/layer_images.png" border="0" alt="layer_images"/></a>
-<a href="examples/pylab_examples/legend_auto.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto.png" border="0" alt="legend_auto"/></a>
+<a href="examples/pylab_examples/legend_auto.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_00.png" border="0" alt="legend_auto"/></a>
<a href="examples/pylab_examples/legend_auto.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_01.png" border="0" alt="legend_auto"/></a>
@@ -349,7 +349,7 @@
<a href="examples/pylab_examples/mathtext_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/mathtext_demo.png" border="0" alt="mathtext_demo"/></a>
-<a href="examples/pylab_examples/matshow.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/matshow.png" border="0" alt="matshow"/></a>
+<a href="examples/pylab_examples/matshow.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/matshow_00.png" border="0" alt="matshow"/></a>
<a href="examples/pylab_examples/matshow.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/matshow_01.png" border="0" alt="matshow"/></a>
@@ -363,13 +363,13 @@
<a href="examples/pylab_examples/multiline.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/multiline.png" border="0" alt="multiline"/></a>
-<a href="examples/pylab_examples/multiple_figs_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/multiple_figs_demo.png" border="0" alt="multiple_figs_demo"/></a>
+<a href="examples/pylab_examples/multiple_figs_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/multiple_figs_demo_00.png" border="0" alt="multiple_figs_demo"/></a>
<a href="examples/pylab_examples/multiple_figs_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/multiple_figs_demo_01.png" border="0" alt="multiple_figs_demo"/></a>
<a href="examples/pylab_examples/nan_test.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/nan_test.png" border="0" alt="nan_test"/></a>
-<a href="examples/pylab_examples/newscalarformatter_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/newscalarformatter_demo.png" border="0" alt="newscalarformatter_demo"/></a>
+<a href="examples/pylab_examples/newscalarformatter_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/newscalarformatter_demo_00.png" border="0" alt="newscalarformatter_demo"/></a>
<a href="examples/pylab_examples/newscalarformatter_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/newscalarformatter_demo_01.png" border="0" alt="newscalarformatter_demo"/></a>
@@ -387,7 +387,7 @@
<a href="examples/pylab_examples/pie_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/pie_demo.png" border="0" alt="pie_demo"/></a>
-<a href="examples/pylab_examples/plotfile_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/plotfile_demo.png" border="0" alt="plotfile_demo"/></a>
+<a href="examples/pylab_examples/plotfile_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/plotfile_demo_00.png" border="0" alt="plotfile_demo"/></a>
<a href="examples/pylab_examples/plotfile_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/plotfile_demo_01.png" border="0" alt="plotfile_demo"/></a>
@@ -413,7 +413,7 @@
<a href="examples/pylab_examples/quadmesh_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/quadmesh_demo.png" border="0" alt="quadmesh_demo"/></a>
-<a href="examples/pylab_examples/quiver_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/quiver_demo.png" border="0" alt="quiver_demo"/></a>
+<a href="examples/pylab_examples/quiver_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/quiver_demo_00.png" border="0" alt="quiver_demo"/></a>
<a href="examples/pylab_examples/quiver_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/quiver_demo_01.png" border="0" alt="quiver_demo"/></a>
@@ -455,7 +455,7 @@
<a href="examples/pylab_examples/subplot_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/subplot_demo.png" border="0" alt="subplot_demo"/></a>
-<a href="examples/pylab_examples/subplot_toolbar.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/subplot_toolbar.png" border="0" alt="subplot_toolbar"/></a>
+<a href="examples/pylab_examples/subplot_toolbar.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/subplot_toolbar_00.png" border="0" alt="subplot_toolbar"/></a>
<a href="examples/pylab_examples/subplot_toolbar.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/subplot_toolbar_01.png" border="0" alt="subplot_toolbar"/></a>
@@ -489,7 +489,7 @@
<a href="examples/pylab_examples/xcorr_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/xcorr_demo.png" border="0" alt="xcorr_demo"/></a>
-<a href="examples/pylab_examples/zorder_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/zorder_demo.png" border="0" alt="zorder_demo"/></a>
+<a href="examples/pylab_examples/zorder_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/zorder_demo_00.png" border="0" alt="zorder_demo"/></a>
<a href="examples/pylab_examples/zorder_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/zorder_demo_01.png" border="0" alt="zorder_demo"/></a>
Modified: trunk/matplotlib/doc/make.py
===================================================================
--- trunk/matplotlib/doc/make.py 2008-10-21 14:52:59 UTC (rev 6287)
+++ trunk/matplotlib/doc/make.py 2008-10-21 15:26:22 UTC (rev 6288)
@@ -17,8 +17,6 @@
def sf():
'push a copy to the sf site'
os.system('cd build/html; rsync -avz . jdh2358,mat...@we...:/home/groups/m/ma/matplotlib/htdocs/ -essh --cvs-exclude')
- # we are now doing this in the doc/examples build
- #os.system('cd ~/mpl/examples; svn-clean; cd ..; rsync -avz examples jdh2358,mat...@we...:/home/groups/m/ma/matplotlib/htdocs/ -essh --cvs-exclude --delete')
def sfpdf():
'push a copy to the sf site'
Modified: trunk/matplotlib/doc/sphinxext/plot_directive.py
===================================================================
--- trunk/matplotlib/doc/sphinxext/plot_directive.py 2008-10-21 14:52:59 UTC (rev 6287)
+++ trunk/matplotlib/doc/sphinxext/plot_directive.py 2008-10-21 15:26:22 UTC (rev 6288)
@@ -127,12 +127,7 @@
while True:
all_exists = True
for format, dpi in formats:
- if i==0:
- outname = basename
- else:
- outname = "%s_%02d" % (basename, i)
-
- outname = os.path.join(outdir, '%s.%s' % (outname, format))
+ outname = os.path.join(outdir, '%s_%02d.%s' % (basename, i, format))
if out_of_date(fullpath, outname):
all_exists = False
break
@@ -163,7 +158,7 @@
fig_managers = _pylab_helpers.Gcf.get_all_fig_managers()
for i, figman in enumerate(fig_managers):
for format, dpi in formats:
- if i==0:
+ if len(fig_managers) == 1:
outname = basename
else:
outname = "%s_%02d" % (basename, i)
@@ -221,7 +216,7 @@
options = "\n".join(options)
for i in range(num_figs):
- if i==0:
+ if num_figs == 1:
outname = basename
else:
outname = "%s_%02d" % (basename, i)
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py 2008-10-21 14:52:59 UTC (rev 6287)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2008-10-21 15:26:22 UTC (rev 6288)
@@ -1771,7 +1771,7 @@
"""
Get the x-axis range [*xmin*, *xmax*]
"""
- return self.viewLim.intervalx
+ return tuple(self.viewLim.intervalx)
def set_xlim(self, xmin=None, xmax=None, emit=True, **kwargs):
"""
@@ -1944,7 +1944,7 @@
"""
Get the y-axis range [*ymin*, *ymax*]
"""
- return self.viewLim.intervaly
+ return tuple(self.viewLim.intervaly)
def set_ylim(self, ymin=None, ymax=None, emit=True, **kwargs):
"""
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2008-10-21 17:58:24
|
Revision: 6289
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6289&view=rev
Author: jdh2358
Date: 2008-10-21 17:58:18 +0000 (Tue, 21 Oct 2008)
Log Message:
-----------
fixed a docstring in mlab
Modified Paths:
--------------
trunk/matplotlib/doc/_templates/index.html
trunk/matplotlib/lib/matplotlib/mlab.py
Modified: trunk/matplotlib/doc/_templates/index.html
===================================================================
--- trunk/matplotlib/doc/_templates/index.html 2008-10-21 15:26:22 UTC (rev 6288)
+++ trunk/matplotlib/doc/_templates/index.html 2008-10-21 17:58:18 UTC (rev 6289)
@@ -16,7 +16,7 @@
<p>matplotlib tries to make easy things easy and hard things possible.
You can generate plots, histograms, power spectra, bar charts,
errorcharts, scatterplots, etc, with just a few lines of code.
- For a sampling, see the <a href="{{ pathto('users/screenshots') }}">screenshots</a>, <a href="{{ pathto('gallery') }}">thumbnail gallery</a>, and
+ For a sampling, see the <a href="{{ pathto('users/screenshots') }}">screenshots</a>, <a href="{{ pathto('gallery') }}">thumbnail</a> gallery, and
<a href="examples/index.html">examples</a> directory</p>
<p align="center"><a href="{{ pathto('users/screenshots') }}"><img align="middle"
@@ -36,11 +36,12 @@
<p>For the power user, you have full control of line styles, font
properties, axes properties, etc, via an object oriented interface
or via a handle graphics interface familiar to Matlab® users.
- The plotting functions in the <a href="api/pyplot_api.html">pyplot</a>
- interface have a high degree of Matlab® compatibility.</p>
+ The pylab mode provides all of the <a href="api/pyplot_api.html">pyplot</a> plotting
+ functions listed below, as well as non-plotting functions from
+ <a href=http://scipy.org/Numpy_Example_List_With_Doc>numpy</a> and
+<a href="api/mlab_api.html">matplotlib.mlab</a> </p>
- <h3>Plotting commands</h3>
- <br/>
+ <h3>Plotting commands</h3> <br/>
<table border="1" cellpadding="3" cellspacing="2">
Modified: trunk/matplotlib/lib/matplotlib/mlab.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/mlab.py 2008-10-21 15:26:22 UTC (rev 6288)
+++ trunk/matplotlib/lib/matplotlib/mlab.py 2008-10-21 17:58:18 UTC (rev 6289)
@@ -117,6 +117,7 @@
The following are deprecated; please import directly from numpy (with
care--function signatures may differ):
+
:meth:`conv`
convolution (numpy.convolve)
@@ -129,6 +130,9 @@
:meth:`linspace`
Linear spaced array from min to max
+:meth:`load`
+ load ASCII file - use numpy.loadtxt
+
:meth:`meshgrid`
Make a 2D grid from 2 1 arrays (numpy.meshgrid)
@@ -138,11 +142,14 @@
:meth:`polyval`
evaluate a vector for a vector of polynomial coeffs (numpy.polyval)
+:meth:`save`
+ save ASCII file - use numpy.savetxt
+
:meth:`trapz`
trapeziodal integration (trapz(x,y) -> numpy.trapz(y,x))
:meth:`vander`
- the Vandermonde matrix (numpy.vander)
+ the Vandermonde matrix (numpy.vander)
"""
@@ -247,13 +254,13 @@
to calculate the Fourier frequencies, freqs, in cycles per time
unit.
- *NFFT*
+ *NFFT*
The length of the FFT window. Must be even; a power 2 is most efficient.
- *detrend*
+ *detrend*
is a function, unlike in matlab where it is a vector.
- *window*
+ *window*
can be a function or a vector of length NFFT. To create window
vectors see numpy.blackman, numpy.hamming, numpy.bartlett,
scipy.signal, scipy.signal.get_window etc.
@@ -478,7 +485,7 @@
.. math::
- C_{xy} = \frac{|P_{xy}|^2}/{P_{xx}P_{yy}}
+ C_{xy} = \\frac{|P_{xy}|^2}{P_{xx}P_{yy}}
The return value is the tuple (*Cxy*, *f*), where *f* are the
frequencies of the coherence vector.
@@ -967,11 +974,11 @@
*y0*
initial state vector
-
+
*t*
- sample times
+ sample times
- *derivs*
+ *derivs*
returns the derivative of the system and has the
signature ``dy = derivs(yi, ti)``
@@ -1149,7 +1156,7 @@
Returns :
.. math::
- \lambda = \frac{1}{n}\sum \ln|f^'(x_i)|
+ \lambda = \\frac{1}{n}\\sum \\ln|f^'(x_i)|
.. seealso::
Sec 10.5 Strogatz (1994) "Nonlinear Dynamics and Chaos".
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2008-10-22 01:24:30
|
Revision: 6290
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6290&view=rev
Author: jdh2358
Date: 2008-10-22 01:24:18 +0000 (Wed, 22 Oct 2008)
Log Message:
-----------
fixed install doc bug 2184682
Modified Paths:
--------------
trunk/matplotlib/doc/examples/gen_rst.py
trunk/matplotlib/doc/faq/howto_faq.rst
trunk/matplotlib/doc/users/installing.rst
trunk/matplotlib/examples/pylab_examples/date_demo1.py
trunk/matplotlib/examples/pylab_examples/date_demo2.py
Modified: trunk/matplotlib/doc/examples/gen_rst.py
===================================================================
--- trunk/matplotlib/doc/examples/gen_rst.py 2008-10-21 17:58:18 UTC (rev 6289)
+++ trunk/matplotlib/doc/examples/gen_rst.py 2008-10-22 01:24:18 UTC (rev 6290)
@@ -150,7 +150,7 @@
contents = '\n'.join([' %s'%row.rstrip() for row in contents.split('\n')])
fh.write(contents)
- fh.write('\n\nKeywords: codex (see :ref:`how-to-search-examples`), python, matplotlib, pylab')
+ fh.write('\n\nKeywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)')
fh.close()
fhsubdirIndex.close()
Modified: trunk/matplotlib/doc/faq/howto_faq.rst
===================================================================
--- trunk/matplotlib/doc/faq/howto_faq.rst 2008-10-21 17:58:18 UTC (rev 6289)
+++ trunk/matplotlib/doc/faq/howto_faq.rst 2008-10-22 01:24:18 UTC (rev 6290)
@@ -431,7 +431,7 @@
.. _howto-show
-Use :func:`~matplotlib.pyplot.show`
+Use :func:`~matplotlib.pyplot.show`
------------------------------------------
The user interface backends need to start the GUI mainloop, and this
@@ -655,13 +655,13 @@
The nearly 300 code :ref:`examples-index` included with the matplotlib
source distribution are full-text searchable from the :ref:`search`
page, but sometimes when you search, you get a lot of results from the
-:ref:`api-index` or other documentation that you may not be interested in if
-you just want to find a complete, free-standing, working piece of
-example code. To facilitate example searches, we have tagged every
-page with the keyword ``codex`` for *code example* which shouldn't
-appear anywhere else on this site except in the FAQ and in every
-example. So if you want to search for an example that uses an ellipse,
-:ref:`search` for ``codex ellipse``.
+:ref:`api-index` or other documentation that you may not be interested
+in if you just want to find a complete, free-standing, working piece
+of example code. To facilitate example searches, we have tagged every
+code example page with the keyword ``codex`` for *code example* which
+shouldn't appear anywhere else on this site except in the FAQ and in
+every example. So if you want to search for an example that uses an
+ellipse, :ref:`search` for ``codex ellipse``.
Modified: trunk/matplotlib/doc/users/installing.rst
===================================================================
--- trunk/matplotlib/doc/users/installing.rst 2008-10-21 17:58:18 UTC (rev 6289)
+++ trunk/matplotlib/doc/users/installing.rst 2008-10-22 01:24:18 UTC (rev 6290)
@@ -39,7 +39,7 @@
progress::
>>> import numpy
- >>> print numpy.__versions__
+ >>> print numpy.__version__
matplotlib requires numpy version 1.1 or later. Although it is not a
requirement to use matplotlib, we strongly encourage you to install
Modified: trunk/matplotlib/examples/pylab_examples/date_demo1.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/date_demo1.py 2008-10-21 17:58:18 UTC (rev 6289)
+++ trunk/matplotlib/examples/pylab_examples/date_demo1.py 2008-10-22 01:24:18 UTC (rev 6290)
@@ -49,4 +49,5 @@
ax.fmt_ydata = price
ax.grid(True)
+fig.autofmt_xdate()
show()
Modified: trunk/matplotlib/examples/pylab_examples/date_demo2.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/date_demo2.py 2008-10-21 17:58:18 UTC (rev 6289)
+++ trunk/matplotlib/examples/pylab_examples/date_demo2.py 2008-10-22 01:24:18 UTC (rev 6290)
@@ -14,8 +14,11 @@
date1 = datetime.date( 2002, 1, 5 )
date2 = datetime.date( 2003, 12, 1 )
-mondays = WeekdayLocator(MONDAY) # every monday
-months = MonthLocator(range(1,13), bymonthday=1) # every month
+# every monday
+mondays = WeekdayLocator(MONDAY)
+
+# every 3rd month
+months = MonthLocator(range(1,13), bymonthday=1, interval=3)
monthsFmt = DateFormatter("%b '%y")
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2008-10-22 02:02:28
|
Revision: 6291
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6291&view=rev
Author: jdh2358
Date: 2008-10-22 02:02:22 +0000 (Wed, 22 Oct 2008)
Log Message:
-----------
applied Pauls keybinding patch
Modified Paths:
--------------
trunk/matplotlib/doc/users/navigation_toolbar.rst
trunk/matplotlib/lib/matplotlib/backend_bases.py
Modified: trunk/matplotlib/doc/users/navigation_toolbar.rst
===================================================================
--- trunk/matplotlib/doc/users/navigation_toolbar.rst 2008-10-22 01:24:18 UTC (rev 6290)
+++ trunk/matplotlib/doc/users/navigation_toolbar.rst 2008-10-22 02:02:22 UTC (rev 6291)
@@ -76,6 +76,30 @@
``svg`` and ``pdf``.
+Navigation Keyboard Shortcuts
+-----------------------------
+
+================================== =====================
+Command Keyboard Shortcut(s)
+================================== =====================
+Home/Reset **h** or **r** or **home**
+Back **c** or **left arrow** or **backspace**
+Forward **v** or **right arrow**
+Pan/Zoom **p**
+Zoom-to-rect **o**
+Save **s**
+Toggle fullscreen **f**
+---------------------------------- ---------------------
+**Pan/Zoom mode only**
+- constrain pan/zoom to x axis hold **x**
+- constrain pan/zoom to y axis hold **y**
+- preserve aspect ratio hold **CONTROL**
+---------------------------------- ---------------------
+**In axes only**
+- Toggle grid **g**
+- Toggle y axis scale (log/linear) **l**
+================================== =====================
+
If you are using :mod:`matplotlib.pyplot` the toolbar will be created
automatically for every figure. If you are writing your own user
interface code, you can add the toolbar as a widget. The exact syntax
Modified: trunk/matplotlib/lib/matplotlib/backend_bases.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backend_bases.py 2008-10-22 01:24:18 UTC (rev 6290)
+++ trunk/matplotlib/lib/matplotlib/backend_bases.py 2008-10-22 02:02:22 UTC (rev 6291)
@@ -1513,6 +1513,23 @@
if event.key == 'f':
self.full_screen_toggle()
+
+ # *h*ome or *r*eset mnemonic
+ elif event.key == 'h' or event.key == 'r' or event.key == "home":
+ self.canvas.toolbar.home()
+ # c and v to enable left handed quick navigation
+ elif event.key == 'left' or event.key == 'c' or event.key == 'backspace':
+ self.canvas.toolbar.back()
+ elif event.key == 'right' or event.key == 'v':
+ self.canvas.toolbar.forward()
+ # *p*an mnemonic
+ elif event.key == 'p':
+ self.canvas.toolbar.pan()
+ # z*o*om mnemonic
+ elif event.key == 'o':
+ self.canvas.toolbar.zoom()
+ elif event.key == 's':
+ self.canvas.toolbar.save_figure(self.canvas.toolbar)
if event.inaxes is None:
return
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2008-10-22 18:45:31
|
Revision: 6297
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6297&view=rev
Author: jdh2358
Date: 2008-10-22 18:45:10 +0000 (Wed, 22 Oct 2008)
Log Message:
-----------
added ticker api docs
Modified Paths:
--------------
trunk/matplotlib/API_CHANGES
trunk/matplotlib/CHANGELOG
trunk/matplotlib/doc/api/index.rst
trunk/matplotlib/lib/matplotlib/axes.py
trunk/matplotlib/lib/matplotlib/ticker.py
Added Paths:
-----------
trunk/matplotlib/doc/api/ticker_api.rst
trunk/matplotlib/doc/utils/
trunk/matplotlib/doc/utils/pylab_names.py
Modified: trunk/matplotlib/API_CHANGES
===================================================================
--- trunk/matplotlib/API_CHANGES 2008-10-22 17:51:36 UTC (rev 6296)
+++ trunk/matplotlib/API_CHANGES 2008-10-22 18:45:10 UTC (rev 6297)
@@ -1,8 +1,8 @@
Changes for 0.98.x
==================
-* Restored 0.91 behavior of get_xlim/ylim returning a tuple
- rather than array - JDH
+* set_xlim, ylim now return a copy of the viewlim array to
+ avoid modify inplace surprises
* AFM.get_fullname() and get_familyname() no longer raise an
exception if the AFM file does not specify these optional attributes,
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2008-10-22 17:51:36 UTC (rev 6296)
+++ trunk/matplotlib/CHANGELOG 2008-10-22 18:45:10 UTC (rev 6297)
@@ -1,5 +1,5 @@
-2008-10-21 Restored 0.91 behavior of get_xlim/ylim returning a tuple
- rather than array - JDH
+2008-10-21 set_xlim, ylim now return a copy of the viewlim array to
+ avoid modify inplace surprises
2008-10-20 Added image thumbnail generating function
matplotlib.image.thumbnail. See
Modified: trunk/matplotlib/doc/api/index.rst
===================================================================
--- trunk/matplotlib/doc/api/index.rst 2008-10-22 17:51:36 UTC (rev 6296)
+++ trunk/matplotlib/doc/api/index.rst 2008-10-22 18:45:10 UTC (rev 6297)
@@ -26,4 +26,5 @@
mlab_api.rst
path_api.rst
pyplot_api.rst
+ ticker_api.rst
index_backend_api.rst
Added: trunk/matplotlib/doc/api/ticker_api.rst
===================================================================
--- trunk/matplotlib/doc/api/ticker_api.rst (rev 0)
+++ trunk/matplotlib/doc/api/ticker_api.rst 2008-10-22 18:45:10 UTC (rev 6297)
@@ -0,0 +1,12 @@
+*******************
+matplotlib ticker
+*******************
+
+
+:mod:`matplotlib.ticker`
+==========================
+
+.. automodule:: matplotlib.ticker
+ :members:
+ :undoc-members:
+ :show-inheritance:
Added: trunk/matplotlib/doc/utils/pylab_names.py
===================================================================
--- trunk/matplotlib/doc/utils/pylab_names.py (rev 0)
+++ trunk/matplotlib/doc/utils/pylab_names.py 2008-10-22 18:45:10 UTC (rev 6297)
@@ -0,0 +1,60 @@
+"""
+autogenerate some tables for pylab namespace
+"""
+from pylab import *
+d = locals()
+keys = d.keys()
+keys.sort()
+
+modd = dict()
+for k in keys:
+ o = d[k]
+ if not callable(o):
+ continue
+ doc = getattr(o, '__doc__', None)
+ if doc is not None:
+ doc = ' - '.join([line for line in doc.split('\n') if line.strip()][:2])
+
+ mod = getattr(o, '__module__', None)
+ if mod is None:
+ mod = 'unknown'
+
+ if mod is not None:
+ if mod.startswith('matplotlib'):
+ if k[0].isupper():
+ k = ':class:`~%s.%s`'%(mod, k)
+ else:
+ k = ':func:`~%s.%s`'%(mod, k)
+ mod = ':mod:`%s`'%mod
+ elif mod.startswith('numpy'):
+ #k = '`%s <%s>`_'%(k, 'http://scipy.org/Numpy_Example_List_With_Doc#%s'%k)
+ k = '`%s <%s>`_'%(k, 'http://sd-2116.dedibox.fr/pydocweb/doc/%s.%s'%(mod, k))
+
+
+ if doc is None: doc = 'TODO'
+
+ mod, k, doc = mod.strip(), k.strip(), doc.strip()[:80]
+ modd.setdefault(mod, []).append((k, doc))
+
+mods = modd.keys()
+mods.sort()
+for mod in mods:
+ border = '*'*len(mod)
+ print mod
+ print border
+
+ print
+ funcs, docs = zip(*modd[mod])
+ maxfunc = max([len(f) for f in funcs])
+ maxdoc = max(40, max([len(d) for d in docs]) )
+ border = ' '.join(['='*maxfunc, '='*maxdoc])
+ print border
+ print ' '.join(['symbol'.ljust(maxfunc), 'description'.ljust(maxdoc)])
+ print border
+ for func, doc in modd[mod]:
+ row = ' '.join([func.ljust(maxfunc), doc.ljust(maxfunc)])
+ print row
+
+ print border
+ print
+ #break
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py 2008-10-22 17:51:36 UTC (rev 6296)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2008-10-22 18:45:10 UTC (rev 6297)
@@ -1769,9 +1769,10 @@
def get_xlim(self):
"""
- Get the x-axis range [*xmin*, *xmax*]
+ Get the x-axis range as a length 2 attay [*xmin*, *xmax*]
"""
- return tuple(self.viewLim.intervalx)
+ # # copy of the viewlim array to avoid modify inplace surprises
+ return self.viewLim.intervalx.copy()
def set_xlim(self, xmin=None, xmax=None, emit=True, **kwargs):
"""
@@ -1781,7 +1782,7 @@
Set the limits for the xaxis
- Returns the current xlimits as a length 2 tuple: [*xmin*, *xmax*]
+ Returns the current xlimits as a length 2 tuple: (*xmin*, *xmax*)
Examples::
@@ -1942,9 +1943,10 @@
def get_ylim(self):
"""
- Get the y-axis range [*ymin*, *ymax*]
+ Get the y-axis range as a length two array [*ymin*, *ymax*]
"""
- return tuple(self.viewLim.intervaly)
+ # copy of the viewlim array to avoid modify inplace surprises
+ return self.viewLim.intervaly.copy()
def set_ylim(self, ymin=None, ymax=None, emit=True, **kwargs):
"""
Modified: trunk/matplotlib/lib/matplotlib/ticker.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/ticker.py 2008-10-22 17:51:36 UTC (rev 6296)
+++ trunk/matplotlib/lib/matplotlib/ticker.py 2008-10-22 18:45:10 UTC (rev 6297)
@@ -21,28 +21,35 @@
The Locator subclasses defined here are
- * NullLocator - No ticks
+:class:`NullLocator`
+ No ticks
- * FixedLocator - Tick locations are fixed
+:class:`FixedLocator`
+ Tick locations are fixed
- * IndexLocator - locator for index plots (eg. where x = range(len(y)))
+:class:`IndexLocator`
+ locator for index plots (eg. where x = range(len(y)))
- * LinearLocator - evenly spaced ticks from min to max
+:class:`LinearLocator`
+ evenly spaced ticks from min to max
- * LogLocator - logarithmically ticks from min to max
+:class:`LogLocator`
+ logarithmically ticks from min to max
- * MultipleLocator - ticks and range are a multiple of base;
- either integer or float
+:class:`MultipleLocator`
+ ticks and range are a multiple of base;
+ either integer or float
+:class:`OldAutoLocator`
+ choose a MultipleLocator and dyamically reassign it for
+ intelligent ticking during navigation
- * OldAutoLocator - choose a MultipleLocator and dyamically reassign
- it for intelligent ticking during navigation
+:class:`MaxNLocator`
+ finds up to a max number of ticks at nice locations
- * MaxNLocator - finds up to a max number of ticks at nice
- locations
+:class:`AutoLocator`
+ :class:`MaxNLocator` with simple defaults. This is the default
+ tick locator for most plotting.
- * AutoLocator - MaxNLocator with simple defaults. This is the
- default tick locator for most plotting.
-
There are a number of locators specialized for date locations - see
the dates module
@@ -70,21 +77,27 @@
formatter operates on a single tick value and returns a string to the
axis.
- * NullFormatter - no labels on the ticks
+:clss:`NullFormatter`
+ no labels on the ticks
- * FixedFormatter - set the strings manually for the labels
+:clss:`FixedFormatter`
+ set the strings manually for the labels
- * FuncFormatter - user defined function sets the labels
+:clss:`FuncFormatter`
+ user defined function sets the labels
- * FormatStrFormatter - use a sprintf format string
+:clss:`FormatStrFormatter`
+ use a sprintf format string
- * ScalarFormatter - default formatter for scalars; autopick the fmt string
+:clss:`ScalarFormatter`
+ default formatter for scalars; autopick the fmt string
- * LogFormatter - formatter for log axes
+:clss:`LogFormatter`
+ formatter for log axes
You can derive your own formatter from the Formatter base class by
-simply overriding the __call__ method. The formatter class has access
+simply overriding the ``__call__`` method. The formatter class has access
to the axis view and data limits.
To control the major and minor tick label formats, use one of the
@@ -95,7 +108,7 @@
ax.yaxis.set_major_formatter( ymajorFormatter )
ax.yaxis.set_minor_formatter( yminorFormatter )
-See :file:`examples/major_minor_demo1.py` for an example of setting
+See :ref:`pylab_examples-major_minor_demo1` for an example of setting
major an minor ticks. See the :module:`matplotlib.dates` module for
more information and examples of using date locators and formatters.
"""
@@ -176,38 +189,38 @@
def fix_minus(self, s):
"""
some classes may want to replace a hyphen for minus with the
- proper unicode symbol as described here
-
- http://sourceforge.net/tracker/index.php?func=detail&aid=1962574&group_id=80706&atid=560720.
+ proper unicode symbol as described `here
+ <http://sourceforge.net/tracker/index.php?func=detail&aid=1962574&group_id=80706&atid=560720>`_.
The default is to do nothing
- Note, if you use this method, eg in format_data or call, you
- probably don't want to use it for format_data_short since the
- toolbar uses this for interative coord reporting and I doubt
- we can expect GUIs across platforms will handle the unicode
- correctly. So for now the classes that override fix_minus
- should have an explicit format_data_short method
+ Note, if you use this method, eg in :meth`format_data` or
+ call, you probably don't want to use it for
+ :meth:`format_data_short` since the toolbar uses this for
+ interative coord reporting and I doubt we can expect GUIs
+ across platforms will handle the unicode correctly. So for
+ now the classes that override :meth:`fix_minus` should have an
+ explicit :meth:`format_data_short` method
"""
return s
class NullFormatter(Formatter):
'Always return the empty string'
def __call__(self, x, pos=None):
- 'Return the format for tick val x at position pos'
+ 'Return the format for tick val *x* at position *pos*'
return ''
class FixedFormatter(Formatter):
'Return fixed strings for tick labels'
def __init__(self, seq):
"""
- seq is a sequence of strings. For positions i<len(seq) return
- seq[i] regardless of x. Otherwise return ''
+ seq is a sequence of strings. For positions ``i<len(seq)` return
+ *seq[i]* regardless of *x*. Otherwise return ''
"""
self.seq = seq
self.offset_string = ''
def __call__(self, x, pos=None):
- 'Return the format for tick val x at position pos'
+ 'Return the format for tick val *x* at position *pos*'
if pos is None or pos>=len(self.seq): return ''
else: return self.seq[pos]
@@ -225,7 +238,7 @@
self.func = func
def __call__(self, x, pos=None):
- 'Return the format for tick val x at position pos'
+ 'Return the format for tick val *x* at position *pos*'
return self.func(x, pos)
@@ -237,7 +250,7 @@
self.fmt = fmt
def __call__(self, x, pos=None):
- 'Return the format for tick val x at position pos'
+ 'Return the format for tick val *x* at position *pos*'
return self.fmt % x
class OldScalarFormatter(Formatter):
@@ -246,7 +259,7 @@
"""
def __call__(self, x, pos=None):
- 'Return the format for tick val x at position pos'
+ 'Return the format for tick val *x* at position *pos*'
xmin, xmax = self.axis.get_view_interval()
d = abs(xmax - xmin)
@@ -304,7 +317,7 @@
else: return s.replace('-', u'\u2212')
def __call__(self, x, pos=None):
- 'Return the format for tick val x at position pos'
+ 'Return the format for tick val *x* at position *pos*'
if len(self.locs)==0:
return ''
else:
@@ -313,7 +326,7 @@
def set_scientific(self, b):
'''True or False to turn scientific notation on or off
- see also set_powerlimits()
+ see also :meth:`set_powerlimits`
'''
self._scientific = bool(b)
@@ -321,7 +334,7 @@
'''
Sets size thresholds for scientific notation.
- e.g. xaxis.set_powerlimits((-3, 4)) sets the pre-2007 default in
+ e.g. ``xaxis.set_powerlimits((-3, 4))`` sets the pre-2007 default in
which scientific notation is used for numbers less than
1e-3 or greater than 1e4.
See also :meth:`set_scientific`.
@@ -463,20 +476,20 @@
"""
Format values for log axis;
- if attribute decadeOnly is True, only the decades will be labelled.
+ if attribute *decadeOnly* is True, only the decades will be labelled.
"""
def __init__(self, base=10.0, labelOnlyBase = True):
"""
- base is used to locate the decade tick,
- which will be the only one to be labeled if labelOnlyBase
- is False
+ *base* is used to locate the decade tick,
+ which will be the only one to be labeled if *labelOnlyBase*
+ is ``False``
"""
self._base = base+0.0
self.labelOnlyBase=labelOnlyBase
self.decadeOnly = True
def base(self,base):
- 'change the base for labeling - warning: should always match the base used for LogLocator'
+ 'change the *base* for labeling - warning: should always match the base used for :class:`LogLocator`'
self._base=base
def label_minor(self,labelOnlyBase):
@@ -485,7 +498,7 @@
def __call__(self, x, pos=None):
- 'Return the format for tick val x at position pos'
+ 'Return the format for tick val *x* at position *pos*'
vmin, vmax = self.axis.get_view_interval()
d = abs(vmax - vmin)
b=self._base
@@ -548,11 +561,11 @@
class LogFormatterExponent(LogFormatter):
"""
- Format values for log axis; using exponent = log_base(value)
+ Format values for log axis; using ``exponent = log_base(value)``
"""
def __call__(self, x, pos=None):
- 'Return the format for tick val x at position pos'
+ 'Return the format for tick val *x* at position *pos*'
vmin, vmax = self.axis.get_view_interval()
@@ -580,11 +593,11 @@
class LogFormatterMathtext(LogFormatter):
"""
- Format values for log axis; using exponent = log_base(value)
+ Format values for log axis; using ``exponent = log_base(value)``
"""
def __call__(self, x, pos=None):
- 'Return the format for tick val x at position pos'
+ 'Return the format for tick val *x* at position *pos*'
b = self._base
# only label the decades
if x == 0:
@@ -619,7 +632,7 @@
"""
Determine the tick locations;
- Note, you should not use the same locator between different Axis
+ Note, you should not use the same locator between different :class:`~matplotlib.axis.Axis`
because the locator stores references to the Axis data and view
limits
"""
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2008-10-22 20:03:28
|
Revision: 6302
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6302&view=rev
Author: mdboom
Date: 2008-10-22 20:03:12 +0000 (Wed, 22 Oct 2008)
Log Message:
-----------
Add clip path support on images. Add a new example and update the dolphin fest.
Modified Paths:
--------------
trunk/matplotlib/examples/pylab_examples/dolphin.py
trunk/matplotlib/src/_backend_agg.cpp
Added Paths:
-----------
trunk/matplotlib/examples/pylab_examples/image_clip_path.py
Modified: trunk/matplotlib/examples/pylab_examples/dolphin.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/dolphin.py 2008-10-22 19:43:40 UTC (rev 6301)
+++ trunk/matplotlib/examples/pylab_examples/dolphin.py 2008-10-22 20:03:12 UTC (rev 6302)
@@ -1,3 +1,4 @@
+import matplotlib.cm as cm
import matplotlib.pyplot as plt
from matplotlib.patches import Circle, PathPatch
from matplotlib.path import Path
@@ -4,6 +5,7 @@
from matplotlib.transforms import Affine2D
import numpy as np
+
r = np.random.rand(50)
t = np.random.rand(50) * np.pi * 2.0
x = r * np.cos(t)
@@ -11,10 +13,16 @@
fig = plt.figure(figsize=(6,6))
ax = plt.subplot(111)
-circle = Circle((0, 0), 1, facecolor=(0,0,0.8),
+circle = Circle((0, 0), 1, facecolor='none',
edgecolor=(0,0.8,0.8), linewidth=3, alpha=0.5)
ax.add_patch(circle)
+im = plt.imshow(np.random.random((100, 100)),
+ origin='lower', cmap=cm.winter,
+ interpolation='spline36',
+ extent=([-1, 1, -1, 1]), zorder=1000)
+im.set_clip_path(circle)
+
plt.plot(x, y, 'o', color=(0.9, 0.9, 1.0), alpha=0.8)
# Dolphin from OpenClipart library by Andy Fitzsimon
Added: trunk/matplotlib/examples/pylab_examples/image_clip_path.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/image_clip_path.py (rev 0)
+++ trunk/matplotlib/examples/pylab_examples/image_clip_path.py 2008-10-22 20:03:12 UTC (rev 6302)
@@ -0,0 +1,26 @@
+#!/usr/bin/env python
+import numpy as np
+import matplotlib.cm as cm
+import matplotlib.mlab as mlab
+import matplotlib.pyplot as plt
+from matplotlib.path import Path
+from matplotlib.patches import PathPatch
+
+delta = 0.025
+x = y = np.arange(-3.0, 3.0, delta)
+X, Y = np.meshgrid(x, y)
+Z1 = mlab.bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0)
+Z2 = mlab.bivariate_normal(X, Y, 1.5, 0.5, 1, 1)
+Z = Z2-Z1 # difference of Gaussians
+
+path = Path([[0, 1], [1, 0], [0, -1], [-1, 0], [0, 1]])
+patch = PathPatch(path, facecolor='none')
+plt.gca().add_patch(patch)
+
+im = plt.imshow(Z, interpolation='bilinear', cmap=cm.gray,
+ origin='lower', extent=[-3,3,-3,3],
+ clip_path=patch, clip_on=True)
+im.set_clip_path(patch)
+
+plt.show()
+
Property changes on: trunk/matplotlib/examples/pylab_examples/image_clip_path.py
___________________________________________________________________
Added: svn:executable
+ *
Modified: trunk/matplotlib/src/_backend_agg.cpp
===================================================================
--- trunk/matplotlib/src/_backend_agg.cpp 2008-10-22 19:43:40 UTC (rev 6301)
+++ trunk/matplotlib/src/_backend_agg.cpp 2008-10-22 20:03:12 UTC (rev 6302)
@@ -788,21 +788,59 @@
Py::Object box_obj = args[3];
Py::Object clippath;
agg::trans_affine clippath_trans;
+ bool has_clippath = false;
+
+ theRasterizer->reset_clipping();
+ rendererBase->reset_clipping(true);
if (args.size() == 6) {
clippath = args[4];
clippath_trans = py_to_agg_transformation_matrix(args[5], false);
+ has_clippath = render_clippath(clippath, clippath_trans);
}
- theRasterizer->reset_clipping();
- rendererBase->reset_clipping(true);
- set_clipbox(box_obj, rendererBase);
-
Py::Tuple empty;
+ image->flipud_out(empty);
pixfmt pixf(*(image->rbufOut));
- image->flipud_out(empty);
- rendererBase->blend_from(pixf, 0, (int)x, (int)(height-(y+image->rowsOut)));
+ if (has_clippath) {
+ agg::trans_affine mtx;
+ mtx *= agg::trans_affine_translation((int)x, (int)(height-(y+image->rowsOut)));
+ agg::path_storage rect;
+ rect.move_to(0, 0);
+ rect.line_to(image->colsOut, 0);
+ rect.line_to(image->colsOut, image->rowsOut);
+ rect.line_to(0, image->rowsOut);
+ rect.line_to(0, 0);
+ agg::conv_transform<agg::path_storage> rect2(rect, mtx);
+
+ agg::trans_affine inv_mtx(mtx);
+ inv_mtx.invert();
+
+ typedef agg::span_allocator<agg::rgba8> color_span_alloc_type;
+ typedef agg::pixfmt_amask_adaptor<pixfmt, alpha_mask_type> pixfmt_amask_type;
+ typedef agg::renderer_base<pixfmt_amask_type> amask_ren_type;
+ typedef agg::image_accessor_clip<agg::pixfmt_rgba32> image_accessor_type;
+ typedef agg::span_interpolator_linear<> interpolator_type;
+ typedef agg::span_image_filter_rgba_nn<image_accessor_type, interpolator_type> image_span_gen_type;
+ typedef agg::renderer_scanline_aa_solid<amask_ren_type> amask_aa_renderer_type;
+ typedef agg::renderer_scanline_aa<amask_ren_type, color_span_alloc_type, image_span_gen_type> renderer_type;
+
+ color_span_alloc_type sa;
+ image_accessor_type ia(pixf, agg::rgba8(0, 0, 0, 0));
+ interpolator_type interpolator(inv_mtx);
+ image_span_gen_type image_span_generator(ia, interpolator);
+ pixfmt_amask_type pfa(*pixFmt, *alphaMask);
+ amask_ren_type r(pfa);
+ renderer_type ri(r, sa, image_span_generator);
+
+ theRasterizer->add_path(rect2);
+ agg::render_scanlines(*theRasterizer, *slineP8, ri);
+ } else {
+ set_clipbox(box_obj, rendererBase);
+ rendererBase->blend_from(pixf, 0, (int)x, (int)(height-(y+image->rowsOut)));
+ }
+
image->flipud_out(empty);
return Py::Object();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|