Revision: 6194 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6194&view=rev Author: jdh2358 Date: 2008-10-15 02:33:38 +0000 (Wed, 15 Oct 2008)
Log Message: ----------- using exiting examples rather than new pyplot ones for screenshots Modified Paths: -------------- trunk/matplotlib/doc/users/intro.rst trunk/matplotlib/doc/users/screenshots.rst Removed Paths: ------------- trunk/matplotlib/doc/pyplots/screenshots_barchart_demo.py trunk/matplotlib/doc/pyplots/screenshots_date_demo.py trunk/matplotlib/doc/pyplots/screenshots_ellipse_demo.py trunk/matplotlib/doc/pyplots/screenshots_fill_demo.py trunk/matplotlib/doc/pyplots/screenshots_histogram_demo.py trunk/matplotlib/doc/pyplots/screenshots_path_patch_demo.py trunk/matplotlib/doc/pyplots/screenshots_pie_demo.py trunk/matplotlib/doc/pyplots/screenshots_scatter_demo.py trunk/matplotlib/doc/pyplots/screenshots_simple_plots.py trunk/matplotlib/doc/pyplots/screenshots_slider_demo.py trunk/matplotlib/doc/pyplots/screenshots_subplot_demo.py trunk/matplotlib/doc/pyplots/screenshots_table_demo.py Deleted: trunk/matplotlib/doc/pyplots/screenshots_barchart_demo.py =================================================================== --- trunk/matplotlib/doc/pyplots/screenshots_barchart_demo.py 2008-10-15 02:14:48 UTC (rev 6193) +++ trunk/matplotlib/doc/pyplots/screenshots_barchart_demo.py 2008-10-15 02:33:38 UTC (rev 6194) @@ -1,24 +0,0 @@ -# a bar plot with errorbars -# a bar plot with errorbars -from pylab import * - -N = 5 -menMeans = (20, 35, 30, 35, 27) -menStd = ( 2, 3, 4, 1, 2) - -ind = arange(N) # the x locations for the groups -width = 0.35 # the width of the bars -p1 = bar(ind, menMeans, width, color='r', yerr=menStd) - -womenMeans = (25, 32, 34, 20, 25) -womenStd = ( 3, 5, 2, 3, 3) -p2 = bar(ind+width, womenMeans, width, color='y', yerr=womenStd) - -ylabel('Scores') -title('Scores by group and gender') -xticks(ind+width, ('G1', 'G2', 'G3', 'G4', 'G5') ) -xlim(-width,len(ind)) -yticks(arange(0,41,10)) - -legend( (p1[0], p2[0]), ('Men', 'Women'), shadow=True) -show() Deleted: trunk/matplotlib/doc/pyplots/screenshots_date_demo.py =================================================================== --- trunk/matplotlib/doc/pyplots/screenshots_date_demo.py 2008-10-15 02:14:48 UTC (rev 6193) +++ trunk/matplotlib/doc/pyplots/screenshots_date_demo.py 2008-10-15 02:33:38 UTC (rev 6194) @@ -1,42 +0,0 @@ -#!/usr/bin/env python -""" -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 - -years = mdates.YearLocator() # every year -months = mdates.MonthLocator() # every month -yearsFmt = mdates.DateFormatter('%Y') - -intc = mlab.csv2rec('mpl_examples/data/intc.csv') - -fig = plt.figure() -ax = fig.add_subplot(111) -ax.plot(intc.date, intc.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) -plt.show() Deleted: trunk/matplotlib/doc/pyplots/screenshots_ellipse_demo.py =================================================================== --- trunk/matplotlib/doc/pyplots/screenshots_ellipse_demo.py 2008-10-15 02:14:48 UTC (rev 6193) +++ trunk/matplotlib/doc/pyplots/screenshots_ellipse_demo.py 2008-10-15 02:33:38 UTC (rev 6194) @@ -1,149 +0,0 @@ - -# This example can be boiled down to a more simplistic example -# to show the problem, but bu including the upper and lower -# bound ellipses, it demonstrates how significant this error -# is to our plots. - -import math -from pylab import * -from matplotlib.patches import Ellipse, Arc - -# given a point x, y -x = 2692.440 -y = 6720.850 - -# get is the radius of a circle through this point -r = math.sqrt( x*x+y*y ) - -# show some comparative circles -delta = 6 - - -################################################## -def custom_ellipse( ax, x, y, major, minor, theta, numpoints = 750, **kwargs ): - xs = [] - ys = [] - incr = 2.0*math.pi / numpoints - incrTheta = 0.0 - while incrTheta <= (2.0*math.pi): - a = major * math.cos( incrTheta ) - b = minor * math.sin( incrTheta ) - l = math.sqrt( ( a**2 ) + ( b**2 ) ) - phi = math.atan2( b, a ) - incrTheta += incr - - xs.append( x + ( l * math.cos( theta + phi ) ) ) - ys.append( y + ( l * math.sin( theta + phi ) ) ) - # end while - - incrTheta = 2.0*math.pi - a = major * math.cos( incrTheta ) - b = minor * math.sin( incrTheta ) - l = sqrt( ( a**2 ) + ( b**2 ) ) - phi = math.atan2( b, a ) - xs.append( x + ( l * math.cos( theta + phi ) ) ) - ys.append( y + ( l * math.sin( theta + phi ) ) ) - - ellipseLine = ax.plot( xs, ys, **kwargs ) - - - - -################################################## -# make the axes -ax1 = subplot( 311, aspect='equal' ) -ax1.set_aspect( 'equal', 'datalim' ) - -# make the lower-bound ellipse -diam = (r - delta) * 2.0 -lower_ellipse = Ellipse( (0.0, 0.0), diam, diam, 0.0, fill=False, edgecolor="darkgreen" ) -ax1.add_patch( lower_ellipse ) - -# make the target ellipse -diam = r * 2.0 -target_ellipse = Ellipse( (0.0, 0.0), diam, diam, 0.0, fill=False, edgecolor="darkred" ) -ax1.add_patch( target_ellipse ) - -# make the upper-bound ellipse -diam = (r + delta) * 2.0 -upper_ellipse = Ellipse( (0.0, 0.0), diam, diam, 0.0, fill=False, edgecolor="darkblue" ) -ax1.add_patch( upper_ellipse ) - -# make the target -diam = delta * 2.0 -target = Ellipse( (x, y), diam, diam, 0.0, fill=False, edgecolor="#DD1208" ) -ax1.add_patch( target ) - -# give it a big marker -ax1.plot( [x], [y], marker='x', linestyle='None', mfc='red', mec='red', markersize=10 ) - -################################################## -# make the axes -ax = subplot( 312, aspect='equal' , sharex=ax1, sharey=ax1) -ax.set_aspect( 'equal', 'datalim' ) - -# make the lower-bound arc -diam = (r - delta) * 2.0 -lower_arc = Arc( (0.0, 0.0), diam, diam, 0.0, fill=False, edgecolor="darkgreen" ) -ax.add_patch( lower_arc ) - -# make the target arc -diam = r * 2.0 -target_arc = Arc( (0.0, 0.0), diam, diam, 0.0, fill=False, edgecolor="darkred" ) -ax.add_patch( target_arc ) - -# make the upper-bound arc -diam = (r + delta) * 2.0 -upper_arc = Arc( (0.0, 0.0), diam, diam, 0.0, fill=False, edgecolor="darkblue" ) -ax.add_patch( upper_arc ) - -# make the target -diam = delta * 2.0 -target = Arc( (x, y), diam, diam, 0.0, fill=False, edgecolor="#DD1208" ) -ax.add_patch( target ) - -# give it a big marker -ax.plot( [x], [y], marker='x', linestyle='None', mfc='red', mec='red', markersize=10 ) - - - - - -################################################## -# now lets do the same thing again using a custom ellipse function - - - -# make the axes -ax = subplot( 313, aspect='equal', sharex=ax1, sharey=ax1 ) -ax.set_aspect( 'equal', 'datalim' ) - -# make the lower-bound ellipse -custom_ellipse( ax, 0.0, 0.0, r-delta, r-delta, 0.0, color="darkgreen" ) - -# make the target ellipse -custom_ellipse( ax, 0.0, 0.0, r, r, 0.0, color="darkred" ) - -# make the upper-bound ellipse -custom_ellipse( ax, 0.0, 0.0, r+delta, r+delta, 0.0, color="darkblue" ) - -# make the target -custom_ellipse( ax, x, y, delta, delta, 0.0, color="#BB1208" ) - -# give it a big marker -ax.plot( [x], [y], marker='x', linestyle='None', mfc='red', mec='red', markersize=10 ) - - -# give it a big marker -ax.plot( [x], [y], marker='x', linestyle='None', mfc='red', mec='red', markersize=10 ) - -################################################## -# lets zoom in to see the area of interest - -ax1.set_xlim(2650, 2735) -ax1.set_ylim(6705, 6735) - -savefig("ellipse") -show() - - Deleted: trunk/matplotlib/doc/pyplots/screenshots_fill_demo.py =================================================================== --- trunk/matplotlib/doc/pyplots/screenshots_fill_demo.py 2008-10-15 02:14:48 UTC (rev 6193) +++ trunk/matplotlib/doc/pyplots/screenshots_fill_demo.py 2008-10-15 02:33:38 UTC (rev 6194) @@ -1,7 +0,0 @@ -from pylab import * -t = arange(0.0, 1.01, 0.01) -s = sin(2*2*pi*t) - -fill(t, s*exp(-5*t), 'r') -grid(True) -show() Deleted: trunk/matplotlib/doc/pyplots/screenshots_histogram_demo.py =================================================================== --- trunk/matplotlib/doc/pyplots/screenshots_histogram_demo.py 2008-10-15 02:14:48 UTC (rev 6193) +++ trunk/matplotlib/doc/pyplots/screenshots_histogram_demo.py 2008-10-15 02:33:38 UTC (rev 6194) @@ -1,20 +0,0 @@ -from matplotlib import rcParams -from pylab import * - - -mu, sigma = 100, 15 -x = mu + sigma*randn(10000) - -# the histogram of the data -n, bins, patches = hist(x, 100, normed=1) - -# add a 'best fit' line -y = normpdf( bins, mu, sigma) -l = plot(bins, y, 'r--', linewidth=2) -xlim(40, 160) - -xlabel('Smarts') -ylabel('P') -title(r'$\rm{IQ:}\/ \mu=100,\/ \sigma=15$') - -show() Deleted: trunk/matplotlib/doc/pyplots/screenshots_path_patch_demo.py =================================================================== --- trunk/matplotlib/doc/pyplots/screenshots_path_patch_demo.py 2008-10-15 02:14:48 UTC (rev 6193) +++ trunk/matplotlib/doc/pyplots/screenshots_path_patch_demo.py 2008-10-15 02:33:38 UTC (rev 6194) @@ -1,36 +0,0 @@ -import numpy as np -import matplotlib.path as mpath -import matplotlib.patches as mpatches -import matplotlib.pyplot as plt - -Path = mpath.Path - -fig = plt.figure() -ax = fig.add_subplot(111) - -pathdata = [ - (Path.MOVETO, (1.58, -2.57)), - (Path.CURVE4, (0.35, -1.1)), - (Path.CURVE4, (-1.75, 2.0)), - (Path.CURVE4, (0.375, 2.0)), - (Path.LINETO, (0.85, 1.15)), - (Path.CURVE4, (2.2, 3.2)), - (Path.CURVE4, (3, 0.05)), - (Path.CURVE4, (2.0, -0.5)), - (Path.CLOSEPOLY, (1.58, -2.57)), - ] - -codes, verts = zip(*pathdata) -path = mpath.Path(verts, codes) -patch = mpatches.PathPatch(path, facecolor='red', edgecolor='yellow', alpha=0.5) -ax.add_patch(patch) - -x, y = zip(*path.vertices) -line, = ax.plot(x, y, 'go-') -ax.grid() -ax.set_xlim(-3,4) -ax.set_ylim(-3,4) -ax.set_title('spline paths') -plt.show() - - Deleted: trunk/matplotlib/doc/pyplots/screenshots_pie_demo.py =================================================================== --- trunk/matplotlib/doc/pyplots/screenshots_pie_demo.py 2008-10-15 02:14:48 UTC (rev 6193) +++ trunk/matplotlib/doc/pyplots/screenshots_pie_demo.py 2008-10-15 02:33:38 UTC (rev 6194) @@ -1,26 +0,0 @@ -""" -Make a pie chart - see -http://matplotlib.sf.net/matplotlib.pylab.html#-pie for the docstring. - -This example shows a basic pie chart with labels optional features, -like autolabeling the percentage, offsetting a slice with "explode" -and adding a shadow. - -Requires matplotlib0-0.70 or later - -""" -from pylab import * - -# make a square figure and axes -figure(1, figsize=(6,6)) -ax = axes([0.1, 0.1, 0.8, 0.8]) - -labels = 'Frogs', 'Hogs', 'Dogs', 'Logs' -fracs = [15,30,45, 10] - -explode=(0, 0.05, 0, 0) -pie(fracs, explode=explode, labels=labels, autopct='%1.1f%%', shadow=True) -title('Raining Hogs and Dogs', bbox={'facecolor':'0.8', 'pad':5}) - -show() - Deleted: trunk/matplotlib/doc/pyplots/screenshots_scatter_demo.py =================================================================== --- trunk/matplotlib/doc/pyplots/screenshots_scatter_demo.py 2008-10-15 02:14:48 UTC (rev 6193) +++ trunk/matplotlib/doc/pyplots/screenshots_scatter_demo.py 2008-10-15 02:33:38 UTC (rev 6194) @@ -1,28 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt -import matplotlib.mlab as mlab - -intc = mlab.csv2rec('mpl_examples/data/intc.csv') - -delta1 = np.diff(intc.adj_close)/intc.adj_close[:-1] - -# size in points ^2 -volume = (15*intc.volume[:-2]/intc.volume[0])**2 -close = 0.003*intc.close[:-2]/0.003*intc.open[:-2] - -fig = plt.figure() -ax = fig.add_subplot(111) -ax.scatter(delta1[:-1], delta1[1:], c=close, s=volume, alpha=0.75) - -#ticks = arange(-0.06, 0.061, 0.02) -#xticks(ticks) -#yticks(ticks) - -ax.set_xlabel(r'$\Delta_i$', fontsize=20) -ax.set_ylabel(r'$\Delta_{i+1}$', fontsize=20) -ax.set_title('Volume and percent change') -ax.grid(True) - -plt.show() - - Deleted: trunk/matplotlib/doc/pyplots/screenshots_simple_plots.py =================================================================== --- trunk/matplotlib/doc/pyplots/screenshots_simple_plots.py 2008-10-15 02:14:48 UTC (rev 6193) +++ trunk/matplotlib/doc/pyplots/screenshots_simple_plots.py 2008-10-15 02:33:38 UTC (rev 6194) @@ -1,11 +0,0 @@ -from pylab import * - -t = arange(0.0, 2.0, 0.01) -s = sin(2*pi*t) -plot(t, s, linewidth=1.0) - -xlabel('time (s)') -ylabel('voltage (mV)') -title('About as simple as it gets, folks') -grid(True) -show() Deleted: trunk/matplotlib/doc/pyplots/screenshots_slider_demo.py =================================================================== --- trunk/matplotlib/doc/pyplots/screenshots_slider_demo.py 2008-10-15 02:14:48 UTC (rev 6193) +++ trunk/matplotlib/doc/pyplots/screenshots_slider_demo.py 2008-10-15 02:33:38 UTC (rev 6194) @@ -1,43 +0,0 @@ -from pylab import * -from matplotlib.widgets import Slider, Button, RadioButtons - -ax = subplot(111) -subplots_adjust(left=0.25, bottom=0.25) -t = arange(0.0, 1.0, 0.001) -a0 = 5 -f0 = 3 -s = a0*sin(2*pi*f0*t) -l, = plot(t,s, lw=2, color='red') -axis([0, 1, -10, 10]) - -axcolor = 'lightgoldenrodyellow' -axfreq = axes([0.25, 0.1, 0.65, 0.03], axisbg=axcolor) -axamp = axes([0.25, 0.15, 0.65, 0.03], axisbg=axcolor) - -sfreq = Slider(axfreq, 'Freq', 0.1, 30.0, valinit=f0) -samp = Slider(axamp, 'Amp', 0.1, 10.0, valinit=a0) - -def update(val): - amp = samp.val - freq = sfreq.val - l.set_ydata(amp*sin(2*pi*freq*t)) - draw() -sfreq.on_changed(update) -samp.on_changed(update) - -resetax = axes([0.8, 0.025, 0.1, 0.04]) -button = Button(resetax, 'Reset', color=axcolor, hovercolor=0.975) -def reset(event): - sfreq.reset() - samp.reset() -button.on_clicked(reset) - -rax = axes([0.025, 0.5, 0.15, 0.15], axisbg=axcolor) -radio = RadioButtons(rax, ('red', 'blue', 'green'), active=0) -def colorfunc(label): - l.set_color(label) - draw() -radio.on_clicked(colorfunc) - -show() - Deleted: trunk/matplotlib/doc/pyplots/screenshots_subplot_demo.py =================================================================== --- trunk/matplotlib/doc/pyplots/screenshots_subplot_demo.py 2008-10-15 02:14:48 UTC (rev 6193) +++ trunk/matplotlib/doc/pyplots/screenshots_subplot_demo.py 2008-10-15 02:33:38 UTC (rev 6194) @@ -1,25 +0,0 @@ -#!/usr/bin/env python -from pylab import * - -def f(t): - s1 = cos(2*pi*t) - e1 = exp(-t) - return multiply(s1,e1) - -t1 = arange(0.0, 5.0, 0.1) -t2 = arange(0.0, 5.0, 0.02) -t3 = arange(0.0, 2.0, 0.01) - -subplot(211) -plot(t1, f(t1), 'bo', t2, f(t2), 'k--', markerfacecolor='green') -grid(True) -title('A tale of 2 subplots') -ylabel('Damped oscillation') - -subplot(212) -plot(t3, cos(2*pi*t3), 'r.') -grid(True) -xlabel('time (s)') -ylabel('Undamped') -show() - Deleted: trunk/matplotlib/doc/pyplots/screenshots_table_demo.py =================================================================== --- trunk/matplotlib/doc/pyplots/screenshots_table_demo.py 2008-10-15 02:14:48 UTC (rev 6193) +++ trunk/matplotlib/doc/pyplots/screenshots_table_demo.py 2008-10-15 02:33:38 UTC (rev 6194) @@ -1,94 +0,0 @@ -#!/usr/bin/env python -import matplotlib - -from pylab import * -from matplotlib.colors import colorConverter - - -#Some simple functions to generate colours. -def pastel(colour, weight=2.4): - """ Convert colour into a nice pastel shade""" - rgb = asarray(colorConverter.to_rgb(colour)) - # scale colour - maxc = max(rgb) - if maxc < 1.0 and maxc > 0: - # scale colour - scale = 1.0 / maxc - rgb = rgb * scale - # now decrease saturation - total = sum(rgb) - slack = 0 - for x in rgb: - slack += 1.0 - x - - # want to increase weight from total to weight - # pick x s.t. slack * x == weight - total - # x = (weight - total) / slack - x = (weight - total) / slack - - rgb = [c + (x * (1.0-c)) for c in rgb] - - return rgb - -def get_colours(n): - """ Return n pastel colours. """ - base = asarray([[1,0,0], [0,1,0], [0,0,1]]) - - if n <= 3: - return base[0:n] - - # how many new colours to we need to insert between - # red and green and between green and blue? - needed = (((n - 3) + 1) / 2, (n - 3) / 2) - - colours = [] - for start in (0, 1): - for x in linspace(0, 1, needed[start]+2): - colours.append((base[start] * (1.0 - x)) + - (base[start+1] * x)) - - return [pastel(c) for c in colours[0:n]] - - - -axes([0.2, 0.2, 0.7, 0.6]) # leave room below the axes for the table - -data = [[ 66386, 174296, 75131, 577908, 32015], - [ 58230, 381139, 78045, 99308, 160454], - [ 89135, 80552, 152558, 497981, 603535], - [ 78415, 81858, 150656, 193263, 69638], - [ 139361, 331509, 343164, 781380, 52269]] - -colLabels = ('Freeze', 'Wind', 'Flood', 'Quake', 'Hail') -rowLabels = ['%d year' % x for x in (100, 50, 20, 10, 5)] - -# Get some pastel shades for the colours -colours = get_colours(len(colLabels)) -colours.reverse() -rows = len(data) - -ind = arange(len(colLabels)) + 0.3 # the x locations for the groups -cellText = [] -width = 0.4 # the width of the bars -yoff = array([0.0] * len(colLabels)) # the bottom values for stacked bar chart -for row in xrange(rows): - bar(ind, data[row], width, bottom=yoff, color=colours[row]) - yoff = yoff + data[row] - cellText.append(['%1.1f' % (x/1000.0) for x in yoff]) - -# Add a table at the bottom of the axes -colours.reverse() -cellText.reverse() -the_table = table(cellText=cellText, - rowLabels=rowLabels, rowColours=colours, - colLabels=colLabels, - loc='bottom') -ylabel("Loss $1000's") -vals = arange(0, 2500, 500) -yticks(vals*1000, ['%d' % val for val in vals]) -xticks([]) -title('Loss by Disaster') -#savefig('table_demo_small', dpi=75) -#savefig('table_demo_large', dpi=300) - -show() Modified: trunk/matplotlib/doc/users/intro.rst =================================================================== --- trunk/matplotlib/doc/users/intro.rst 2008-10-15 02:14:48 UTC (rev 6193) +++ trunk/matplotlib/doc/users/intro.rst 2008-10-15 02:33:38 UTC (rev 6194) @@ -2,11 +2,11 @@ ============ matplotlib is a library for making 2D plots of arrays in `Python -<http://www.python.org>`_. Although it has its origins in emulating -the `MATLAB™ <http://www.mathworks.com>`_ graphics commands, it does -not require MATLAB, and can be used in a Pythonic, object oriented +<http://www.python.org>`. Although it has its origins in emulating +the `MATLAB™ <http://www.mathworks.com>` graphics commands, it is +independent of MATLAB, and can be used in a Pythonic, object oriented way. Although matplotlib is written primarily in pure Python, it -makes heavy use of `NumPy <http://www.numpy.org>`_ and other extension +makes heavy use of `NumPy <http://www.numpy.org>` and other extension code to provide good performance even for large arrays. matplotlib is designed with the philosophy that you should be able to @@ -25,7 +25,8 @@ programming language, and decided to start over in Python. Python more than makes up for all of MATLAB's deficiencies as a programming language, but I was having difficulty finding a 2D plotting package -(for 3D `VTK <http://www.vtk.org/>`_) more than exceeds all of my needs). +(for 3D `VTK <http://www.vtk.org/>` more than exceeds all of my +needs). When I went searching for a Python plotting package, I had several requirements: @@ -57,26 +58,28 @@ The matplotlib code is conceptually divided into three parts: the *pylab interface* is the set of functions provided by :mod:`matplotlib.pylab` which allow the user to create plots with code -quite similar to MATLAB figure generating code. The *matplotlib -frontend* or *matplotlib API* is the set of classes that do the heavy -lifting, creating and managing figures, text, lines, plots and so on. -This is an abstract interface that knows nothing about output. The -*backends* are device dependent drawing devices, aka renderers, that -transform the frontend representation to hardcopy or a display device. -Example backends: PS creates `PostScript® -<http://http://www.adobe.com/products/postscript/>`_ hardcopy, SVG -creates `Scalable Vector Graphics <http://www.w3.org/Graphics/SVG/>`_ +quite similar to MATLAB figure generating code +(:ref:`pyplot-tutorial`). The *matplotlib frontend* or *matplotlib +API* is the set of classes that do the heavy lifting, creating and +managing figures, text, lines, plots and so on +(:ref:`artist-tutorial`). This is an abstract interface that knows +nothing about output. The *backends* are device dependent drawing +devices, aka renderers, that transform the frontend representation to +hardcopy or a display device (:ref:`what-is-a-backend`). Example +backends: PS creates `PostScript® +<http://http://www.adobe.com/products/postscript/>` hardcopy, SVG +creates `Scalable Vector Graphics <http://www.w3.org/Graphics/SVG/>` hardcopy, Agg creates PNG output using the high quality `Anti-Grain -Geometry <http://www.antigrain.com>`_ library that ships with -matplotlib, GTK embeds matplotlib in a `Gtk+ <http://www.gtk.org/>`_ +Geometry <http://www.antigrain.com>` library that ships with +matplotlib, GTK embeds matplotlib in a `Gtk+ <http://www.gtk.org/>` application, GTKAgg uses the Anti-Grain renderer to create a figure and embed it a Gtk+ application, and so on for `PDF -<http://www.adobe.com/products/acrobat/adobepdf.html>`_, `WxWidgets -<http://www.wxpython.org/>`_, `Tkinter -<http://docs.python.org/lib/module-Tkinter.html>`_ etc. +<http://www.adobe.com/products/acrobat/adobepdf.html>`, `WxWidgets +<http://www.wxpython.org/>`, `Tkinter +<http://docs.python.org/lib/module-Tkinter.html>` etc. matplotlib is used by many people in many different contexts. Some -people want to automatically generate PostScript® files to send +people want to automatically generate PostScript files to send to a printer or publishers. Others deploy matplotlib on a web application server to generate PNG output for inclusion in dynamically-generated web pages. Some use matplotlib interactively Modified: trunk/matplotlib/doc/users/screenshots.rst =================================================================== --- trunk/matplotlib/doc/users/screenshots.rst 2008-10-15 02:14:48 UTC (rev 6193) +++ trunk/matplotlib/doc/users/screenshots.rst 2008-10-15 02:33:38 UTC (rev 6194) @@ -1,16 +1,13 @@ Here you will find a host of example figures with the code that generated them -.. _screenshots_simple_plot: - Simple Plot =========== The most basic :func:`~matplotlib.pyplot.plot`, with text labels -.. plot:: screenshots_simple_plots.py +.. plot:: ../mpl_examples/pylab_examples/simple_plot.py - .. _screenshots_subplot_demo: Subplot demo @@ -19,9 +16,8 @@ Multiple regular axes (numrows by numcolumns) are created with the :func:`~matplotlib.pyplot.subplot` command. -.. plot:: screenshots_subplot_demo.py +.. plot:: ../mpl_examples/pylab_examples/subplot_demo.py - .. _screenshots_histogram_demo: Histograms @@ -30,8 +26,9 @@ The :func:`~matplotlib.pyplot.hist` command automatically generates histograms and will return the bin counts or probabilities -.. plot:: screenshots_histogram_demo.py +.. plot:: ../mpl_examples/pylab_examples/histogram_demo.py + .. _screenshots_path_demo: Path demo @@ -40,9 +37,8 @@ You can add aribitrary paths in matplotlib as of release 0.98. See the :mod:`matplotlib.path`. -.. plot:: screenshots_path_patch_demo.py +.. plot:: ../mpl_examples/api/path_patch_demo.py - .. _screenshots_ellipse_demo: Ellipses @@ -57,9 +53,8 @@ provides a scale free, accurate graph of the arc regardless of zoom level -.. plot:: screenshots_ellipse_demo.py +.. plot:: ../mpl_examples/pylab_examples/ellipse_demo.py - .. _screenshots_barchart_demo: Bar charts @@ -68,11 +63,11 @@ The :func:`~matplotlib.pyplot.bar` command takes error bars as an optional argument. You can also use up and down bars, stacked bars, candlestic' bars, etc, ... See -`bar_stacked.py <examples/pylab_examples/bar_stacked.py>`_ for another example. +`bar_stacked.py <examples/pylab_examples/bar_stacked.py>`_ for another example. You can make horizontal bar charts with the :func:`~matplotlib.pyplot.barh` command. -.. plot:: screenshots_barchart_demo.py +.. plot:: ../mpl_examples/pylab_examples/barchart_demo.py .. _screenshots_pie_demo: @@ -87,7 +82,7 @@ Take a close look at the attached code that produced this figure; nine lines of code. -.. plot:: screenshots_pie_demo.py +.. plot:: ../mpl_examples/pylab_examples/pie_demo.py .. _screenshots_table_demo: @@ -97,7 +92,7 @@ The :func:`~matplotlib.pyplot.table` command will place a text table on the axes -.. plot:: screenshots_table_demo.py +.. plot:: ../mpl_examples/pylab_examples/table_demo.py .. _screenshots_scatter_demo: @@ -112,7 +107,7 @@ alpha attribute is used to make semitransparent circle markers with the Agg backend (see :ref:`what-is-a-backend`) -.. plot:: screenshots_scatter_demo.py +.. plot:: ../mpl_examples/pylab_examples/scatter_demo2.py .. _screenshots_slider_demo: @@ -123,9 +118,9 @@ Matplotlib has basic GUI widgets that are independent of the graphical user interface you are using, allowing you to write cross GUI figures and widgets. See matplotlib.widgets and the widget `examples -<examples/widgets>`_ +<examples/widgets>` -.. plot:: screenshots_slider_demo.py +[.. plot:: ../mpl_examples/widgets/slider_demo.py .. _screenshots_fill_demo: @@ -137,7 +132,7 @@ plot filled polygons. Thanks to Andrew Straw for providing this function -.. plot:: screenshots_fill_demo.py +.. plot:: ../mpl_examples/pylab_examples/fill_demo.py .. _screenshots_date_demo: @@ -147,9 +142,9 @@ You can plot date data with major and minor ticks and custom tick formatters for both the major and minor ticks; see matplotlib.ticker -and matplotlib.dates for details and usage. +and matplotlib.dates for details and usage. -.. plot:: screenshots_date_demo.py +.. plot:: ../mpl_examples/api/date_demo.py This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Matplotlib-checkins mailing list Matplotlib-checkins@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins