Revision: 8121 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8121&view=rev Author: jdh2358 Date: 2010-02-08 17:50:27 +0000 (Mon, 08 Feb 2010)
Log Message: ----------- added Ariels csd patch for proper scaling at the dc component Modified Paths: -------------- branches/v0_99_maint/doc/faq/installing_faq.rst branches/v0_99_maint/doc/glossary/index.rst branches/v0_99_maint/doc/users/installing.rst branches/v0_99_maint/lib/matplotlib/mlab.py Modified: branches/v0_99_maint/doc/faq/installing_faq.rst =================================================================== --- branches/v0_99_maint/doc/faq/installing_faq.rst 2010-02-08 17:11:38 UTC (rev 8120) +++ branches/v0_99_maint/doc/faq/installing_faq.rst 2010-02-08 17:50:27 UTC (rev 8121) @@ -146,11 +146,11 @@ others in web application servers to dynamically serve up graphs. To support all of these use cases, matplotlib can target different -outputs, and each of these capabililities is called a backend (the +outputs, and each of these capabililities is called a backend; the "frontend" is the user facing code, ie the plotting code, whereas the "backend" does all the dirty work behind the scenes to make the figure. There are two types of backends: user interface backends (for -use in pygtk, wxpython, tkinter, qt or fltk) and hardcopy backends to +use in pygtk, wxpython, tkinter, qt, macosx, or fltk) and hardcopy backends to make image files (PNG, SVG, PDF, PS). There are a two primary ways to configure your backend. One is to set @@ -183,10 +183,10 @@ renderer for user interfaces is ``Agg`` which uses the `antigrain <http://antigrain.html>`_ C++ library to make a raster (pixel) image of the figure. All of the user interfaces can be used with agg -rendering, eg ``WXAgg``, ``GTKAgg``, ``QTAgg``, ``TkAgg``. In -addition, some of the user interfaces support other rendering engines. -For example, with GTK, you can also select GDK rendering (backend -``GTK``) or Cairo rendering (backend ``GTKCairo``). +rendering, eg ``WXAgg``, ``GTKAgg``, ``QTAgg``, ``TkAgg``, +``CocoaAgg``. In addition, some of the user interfaces support other +rendering engines. For example, with GTK, you can also select GDK +rendering (backend ``GTK``) or Cairo rendering (backend ``GTKCairo``). For the rendering engines, one can also distinguish between `vector <http://en.wikipedia.org/wiki/Vector_graphics>`_ or `raster @@ -238,6 +238,7 @@ QtAgg Agg rendering to a :term:`Qt` canvas (requires PyQt_) Qt4Agg Agg rendering to a :term:`Qt4` canvas (requires PyQt4_) FLTKAgg Agg rendering to a :term:`FLTK` canvas (requires pyFLTK_) +macosx Cocoa rendering in OSX windows ============ ================================================================ .. _`Anti-Grain Geometry`: http://www.antigrain.com/ Modified: branches/v0_99_maint/doc/glossary/index.rst =================================================================== --- branches/v0_99_maint/doc/glossary/index.rst 2010-02-08 17:11:38 UTC (rev 8120) +++ branches/v0_99_maint/doc/glossary/index.rst 2010-02-08 17:50:27 UTC (rev 8121) @@ -14,6 +14,11 @@ Cairo The `Cairo graphics <http://cairographics.org>`_ engine + + dateutil + The `dateutil <http://labix.org/python-dateutil>`_ library + provides extensions to the standard datetime module + EPS Encapsulated Postscript (`EPS <http://en.wikipedia.org/wiki/Encapsulated_PostScript>`_) @@ -86,6 +91,14 @@ language widely used for scripting, application development, web application servers, scientific computing and more. + + pytz + `pytz <http://pytz.sourceforge.net/>`_ provides the Olson tz + database in Python. it allows accurate and cross platform + timezone calculations and solves the issue of ambiguous times at + the end of daylight savings + + Qt `Qt <http://trolltech.com/products/qt/>`__ is a cross-platform application framework for desktop and embedded development. Modified: branches/v0_99_maint/doc/users/installing.rst =================================================================== --- branches/v0_99_maint/doc/users/installing.rst 2010-02-08 17:11:38 UTC (rev 8120) +++ branches/v0_99_maint/doc/users/installing.rst 2010-02-08 17:50:27 UTC (rev 8121) @@ -44,11 +44,30 @@ matplotlib requires numpy version 1.1 or later. Although it is not a requirement to use matplotlib, we strongly encourage you to install `ipython <http://ipython.scipy.org/dist>`_, which is an interactive -shell for python that is matplotlib aware. Once you have ipython, -numpy and matplotlib installed, in ipython's "pylab" mode you have a -matlab-like environment that automatically handles most of the -configuration details for you, so you can get up and running quickly:: +shell for python that is matplotlib aware. +Next we need to get matplotlib installed. We provide prebuilt +binaries for OS X and Windows on the matplotlib `download +<http://sourceforge.net/projects/matplotlib/files/>`_ page. Click on +the latest release of the "matplotlib" package, choose your python +version (2.5 or 2.6) and your platform (macosx or win32) and you +should be good to go. If you have any problems, please check the +:ref:`installing-faq`, google around a little bit, and post a question +the `mailing list +<http://sourceforge.net/project/showfiles.php?group_id=80706>`_. If +you are on debian/unbuntu linux, it suffices to do:: + + > sudo apt-get install python-matplotlib + +Instructions for installing our OSX binaries are found in the FAQ +:ref:`install_osx_binaries`. + + +Once you have ipython, numpy and matplotlib installed, in ipython's +"pylab" mode you have a matlab-like environment that automatically +handles most of the configuration details for you, so you can get up +and running quickly:: + jo...@flag:~> ipython -pylab Python 2.4.5 (#4, Apr 12 2008, 09:09:16) IPython 0.9.0 -- An enhanced Interactive Python. @@ -60,20 +79,6 @@ In [2]: hist(x, 100) -And a *voila*, a figure pops up. But we are putting the cart ahead of -the horse -- first we need to get matplotlib installed. We provide -prebuilt binaries for OS X and Windows on the matplotlib `download -<http://sourceforge.net/projects/matplotlib/files/>`_ page. Click on -the latest release of the "matplotlib" package, choose your python -version (2.4 or 2.5) and your platform (macosx or win32) and you -should be good to go. If you have any problems, please check the -:ref:`installing-faq`, google around a little bit, and post a question -the `mailing list -<http://sourceforge.net/project/showfiles.php?group_id=80706>`_. - -Instructions for installing our OSX binaries are found in the FAQ -ref:`install_osx_binaries`. - Note that when testing matplotlib installations from the interactive python console, there are some issues relating to user interface toolkits and interactive settings that are discussed in @@ -85,9 +90,9 @@ ====================== If you are interested perhaps in contributing to matplotlib -development, or just like to build everything yourself, it is not -difficult to build matplotlib from source. Grab the latest *tar.gz* -release file from `sourceforge +development, running the latest greatest code, or just like to +build everything yourself, it is not difficult to build matplotlib +from source. Grab the latest *tar.gz* release file from `sourceforge <http://sourceforge.net/project/showfiles.php?group_id=80706>`_, or if you want to develop matplotlib or just need the latest bugfixed version, grab the latest svn version :ref:`install-svn`. @@ -173,17 +178,17 @@ agg template source statically, so it will not affect anything on your system outside of matplotlib. -pytz 2007g or later +:term:`pytz` 2007g or later timezone handling for python datetime objects. By default, matplotlib will install pytz if it isn't already installed on your - system. To override the default, use setup.cfg to force or + system. To override the default, use :file:`setup.cfg to force or prevent installation of pytz. -dateutil 1.1 or later - extensions to python datetime handling. By - default, matplotlib will install dateutil if it isn't already - installed on your system. To override the default, use setup.cfg - to force or prevent installation of dateutil. +:term:`dateutil` 1.1 or later + provides extensions to python datetime handling. By default, matplotlib + will install dateutil if it isn't already installed on your + system. To override the default, use :file:`setup.cfg` to force + or prevent installation of dateutil. Modified: branches/v0_99_maint/lib/matplotlib/mlab.py =================================================================== --- branches/v0_99_maint/lib/matplotlib/mlab.py 2010-02-08 17:11:38 UTC (rev 8120) +++ branches/v0_99_maint/lib/matplotlib/mlab.py 2010-02-08 17:50:27 UTC (rev 8121) @@ -273,10 +273,18 @@ Pxy[:,i] = np.conjugate(fx[:numFreqs]) * fy[:numFreqs] # Scale the spectrum by the norm of the window to compensate for - # windowing loss; see Bendat & Piersol Sec 11.5.2. Also include - # scaling factors for one-sided densities and dividing by the sampling - # frequency, if desired. - Pxy *= scaling_factor / (np.abs(windowVals)**2).sum() + # windowing loss; see Bendat & Piersol Sec 11.5.2. + Pxy *= 1 / (np.abs(windowVals)**2).sum() + + # Also include scaling factors for one-sided densities and dividing by the + # sampling frequency, if desired. Scale everything, except the DC component + # and the NFFT/2 component: + Pxy[1:-1] *= scaling_factor + + #But do scale those components by Fs, if required + if scale_by_freq: + Pxy[[0,-1]] /= Fs + t = 1./Fs * (ind + NFFT / 2.) freqs = float(Fs) / pad_to * np.arange(numFreqs) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ Matplotlib-checkins mailing list Matplotlib-checkins@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins