ANN matplotlib-0.61.0

What's new in matplotlib-0.61.0 -

  Note win32 pygtk users - if you encounter problems or errors related
  to svg loading, see note at end of this email.

You can read these announce notes in html with hyperlinks at
http://matplotlib.sf.net/whats_new.html.

* A new, enhanced, navigation toolbar. Set 'toolbar : toolbar2' in
   matplotlibrc to try it out. Tutorial on the new toolbar is at
   http://matplotlib.sf.net/tutorial.html#toolbar2. Note that this
   toolbar behaves very differently than the classic toolbar. To use
   it, you must click on the pan/zoom or zoom to rect and then
   interact with the axes by dragging your mouse over it. The
   'forward', 'back' and 'home' buttons are used to navigate between
   previously defined view limits. At some point we'll add multiple
   simultaneous axes support for the new toolbar but we're still
   mulling over the interface - if you need it you can still uses
   toolbar : classic.

* Mathtext for PS!!! Also, PS now embeds TrueType fonts so the same
   fonts you use in the *Agg GUIs should be displayed in PS
   output. Thanks Paul Barrett!

* The imread function is used to load PNGs into arrays. I'd like to
   add more image loaders and savers down the road -
   http://matplotlib.sourceforge.net/matplotlib.matlab.html#-imread

* New event handling. The functions mpl_connect and mpl_disconnect
   are used for backend independent event handling. The callback
   signature is func(event). See
   http://matplotlib.sf.net/tutorial.html#events and
   http://matplotlib.sf.net/examples/coords_demo.py. The new events
   carry lots of useful information in them, like the coords in
   display and data units, the axes instance they were over, keys
   pressed during the event and more.

* Many fixes to the SVG backend, including page layout, font support
   and image support. SVG is now considered alpha. You can save
   ps/eps/svg figures from GUI backends by providing the right
   extensions. SVG is currently the fastest backend in my tests.

* More memory leaks fixed - see
   http://matplotlib.sourceforge.net/faq.html#LEAKS for details. My
   estimate is that complex figures (multiple subplots, images, etc..)
   now leak no more than 10-50 bytes per figure. Down from several
   hundred bytes per figure in 0.60.

* Vertical mathtext in backend_agg (ylabels now work properly!).
   mathtext with arbitrary rotations in PS. Thanks Jim Benson and
   Paul Barrett!

* Added some abbrev functions in matplotlib.lines, mainly for
   interactive users trying to save key strokes. markerfacecolor is a
   lot of keys! For lines, these abbrevs were added

        aa : antialiased
        c : color
        ls : linestyle
        lw : linewidth
        mec : markeredgecolor
        mew : markeredgewidth
        mfc : markerfacecolor
        ms : markersize

   Thus you can type --not necessarily recommended for readability in
   scripts or apps but great for throwaway use in interactive shells
    
    # no antialiasing, thick green markeredge lines
    >>> plot(range(10), 'ro', aa=False, mew=2, mec='g')

   Analogs in matplotlib.patches

        aa : antialiased
        lw : linewidth
        ec : edgecolor
        fc : facecolor

* You can put a .matplotlibrc file in a dir to override the one in
   your HOME dir. If you have a project, say a book, and you want to
   make a bunch of images with the same look and feel for the book,
   you can place a custom rc file in the code dir for that book and
   this won't affect the configs you use for normal, interactive use.

* Updated installing instructions at
   http://matplotlib.sf.net/installing.html (see also INSTALL in src
   distro). Fixed a tk/osx install problem in setupext.py

* New demo for wx/wxagg showing how to to make a flicker free cursor
   that follows the mouse and reports the coords in a status bar - see
   http://matplotlib.sf.net/examples/wxcursor_demo.py

* Numerous bug fixes and minor enhancements detailed at
   http://matplotlib.sf.net/CHANGELOG

Downloads at http://sourceforge.net/projects/matplotlib

pygtk / win32 bug

  Alas, an enterprising matplotlib user found a bug in matplotlib-0.61
  on win32 with recent versions of pygtk even before the announcement.
  Sigh. Is it just me or is testing multiple GUIs with multiple,
  incompatible versions on multiple platforms a pain?

  Apparently this bug is only exposed on recent versions of pygtk for
  win32. If you encounter problems, try removing or commenting out
  the last lines of site-packages\matplotlib\backends\backend_gtk.py
  which set the matplotlib minimization icon. Eg, triple quote

"""
# set icon used when windows are minimized
if gtk.pygtk_version >= (2,2,0):
    basedir = matplotlib.rcParams['datapath']
    fname = os.path.join(basedir, 'matplotlib.svg')
    try: gtk.window_set_default_icon_from_file (fname)
    except gobject.GError, exc: print >>sys.stderr, exc
"""

Hallo matplitlib userse,

when using fill_over, it does not draw exactly at one line but with a slightly aberration. This especially is horrible when using a low resolution:
The following program draws a nice sinus-curve and fills all values above 0.5. But when reducing the resolution (i.e. set the variable res to "1") fill_over generates weird fillings.

from matplotlib.matlab import *
from matplotlib.helpers import *
res=0.1
# < 0.1 -> nice resolution
# > 1 -> weird fillings
x=[]
y=[]
x=arange(0,20,res)
for i in x:
  y.append(sin(i))
r=axes()
r.plot(x,y);
fill_over(r,x,y, 0.5, '#0000FF',over=True)
show()

It looks to me, when running your code, that fill_over is doing the
right thing: filling everything between 0.5 and your plotted line with
a color. It is just that with your coarse spacing, you don't have
points at every multiple of pi/2. However, this is with the current CVS
version, so you may have a problem with 0.60.2.

Is fill_over supported in any way? I had a problem finding it, and it
looks like it is in the category of unsupported contribted code.

By the way, Herr Weissman, setting up your sample data can be done
simply by typing

x=arange(0,20)
y=sin(x)

without 'x=', 'y=', or the for loop.

···

On Mon, 2004-08-09 at 13:44, Philipp Weissmann wrote:

when using fill_over, it does not draw exactly at one line but with a
slightly aberration. This especially is horrible when using a low
resolution:

--
Stephen Walton <stephen.walton@...267...>
Dept. of Physics & Astronomy, Cal State Northridge