ANN: matplotlib-0.90.1

matplotlib 0.90.1 is out and available for download from the sourceforge site.

The 0.90 release is the last release in which we will continue to use
the numerix layer internally and build extensions for Numeric,
numarray and numpy. Goingin forward, we will continue to provide the
numerix compatibility layer for external scripts, and recent versions
of Numeric and numarray should continue to work when passed into mpl,
but we will be compiling extensions against numpy only and importing
it directly internally.

Thanks Charlie Moad for handling the release and binary builds, and to
all the mpl developers who made contributions. See
http://matploltib.sf.net/whats_new.html for a summary of new features,
and the CHANGELOG included below for details. As always, be sure to
consult http://matplotlib.sf.net/API_CHANGES to read about any changes
to the API

http://cheeseshop.python.org/pypi/matplotlib/

http://sourceforge.net/project/showfiles.php?group_id=80706&package_id=82474

···

===============================================================
2007-06-02 Released 0.90.1 at revision 3352

2007-06-02 Display only meaningful labels when calling legend()
          without args. - NN

2007-06-02 Have errorbar follow the color cycle even if line is not plotted.
          Suppress plotting of errorbar caps for capsize=0. - NN

2007-06-02 Set markers to same alpha value as line. - NN

2007-06-02 Fix mathtext position in svg backend. - NN

2007-06-01 Deprecate Numeric and numarray for use as numerix. Props to
          Travis -- job well done. - ADS

2007-05-18 Added LaTeX unicode support. Enable with the
          'text.latex.unicode' rcParam. This requires the ucs and
          inputenc LaTeX packages. - ADS

2007-04-23 Fixed some problems with polar -- added general polygon
          clipping to clip the lines a nd grids to the polar axes.
          Added support for set_rmax to easily change the maximum
          radial grid. Added support for polar legend - JDH

2007-04-16 Added Figure.autofmt_xdate to handle adjusting the bottom
          and rotating the tick labels for date plots when the ticks
          often overlap - JDH

2007-04-09 Beginnings of usetex support for pdf backend. -JKS

2007-04-07 Fixed legend/LineCollection bug. Added label support
          to collections. - EF

2007-04-06 Removed deprecated support for a float value as a gray-scale;
          now it must be a string, like '0.5'. Added alpha kwarg to
          ColorConverter.to_rgba_list. - EF

2007-04-06 Fixed rotation of ellipses in pdf backend
          (sf bug #1690559) -JKS

2007-04-04 More matshow tweaks; documentation updates; new method
          set_bounds() for formatters and locators. - EF

2007-04-02 Fixed problem with imshow and matshow of integer arrays;
          fixed problems with changes to color autoscaling. - EF

2007-04-01 Made image color autoscaling work correctly with
          a tracking colorbar; norm.autoscale now scales
          unconditionally, while norm.autoscale_None changes
          only None-valued vmin, vmax. - EF

2007-03-31 Added a qt-based subplot-adjustment dialog - DSD

2007-03-30 Fixed a bug in backend_qt4, reported on mpl-dev - DSD

2007-03-26 Removed colorbar_classic from figure.py; fixed bug in
          Figure.clf() in which _axobservers was not getting
          cleared. Modernization and cleanups. - EF

2007-03-26 Refactored some of the units support -- units now live in
          the respective x and y Axis instances. See also
          API_CHANGES for some alterations to the conversion
          interface. JDH

2007-03-25 Fix masked array handling in quiver.py for numpy. (Numeric
          and numarray support for masked arrays is broken in other
          ways when using quiver. I didn't pursue that.) - ADS

2007-03-23 Made font_manager.py close opened files. - JKS

2007-03-22 Made imshow default extent match matshow - EF

2007-03-22 Some more niceties for xcorr -- a maxlags option, normed
          now works for xcorr as well as axorr, usevlines is
          supported, and a zero correlation hline is added. See
          examples/xcorr_demo.py. Thanks Sameer for the patch. -
          JDH

2007-03-21 Axes.vlines and Axes.hlines now create and returns a
          LineCollection, not a list of lines. This is much faster.
          The kwarg signature has changed, so consult the docs.
          Modified Axes.errorbar which uses vlines and hlines. See
          API_CHANGES; the return signature for these three functions
          is now different

2007-03-20 Refactored units support and added new examples - JDH

2007-03-19 Added Mike's units patch - JDH

2007-03-18 Matshow as an Axes method; test version matshow1() in
          pylab; added 'integer' Boolean kwarg to MaxNLocator
          initializer to force ticks at integer locations. - EF

2007-03-17 Preliminary support for clipping to paths agg - JDH

2007-03-17 Text.set_text() accepts anything convertible with '%s' - EF

2007-03-14 Add masked-array support to hist. - EF

2007-03-03 Change barh to take a kwargs dict and pass it to bar.
          Fixes sf bug #1669506.

2007-03-02 Add rc parameter pdf.inheritcolor, which disables all
          color-setting operations in the pdf backend. The idea is
          that you include the resulting file in another program and
          set the colors (both stroke and fill color) there, so you
          can use the same pdf file for e.g. a paper and a
          presentation and have them in the surrounding color. You
          will probably not want to draw figure and axis frames in
          that case, since they would be filled in the same color. - JKS

2007-02-26 Prevent building _wxagg.so with broken Mac OS X wxPython. - ADS

2007-02-23 Require setuptools for Python 2.3 - ADS

2007-02-22 WXAgg accelerator updates - KM
          WXAgg's C++ accelerator has been fixed to use the correct wxBitmap
          constructor.

          The backend has been updated to use new wxPython functionality to
          provide fast blit() animation without the C++ accelerator. This
          requires wxPython 2.8 or later. Previous versions of wxPython can
          use the C++ acclerator or the old pure Python routines.

          setup.py no longer builds the C++ accelerator when wxPython >= 2.8
          is present.

          The blit() method is now faster regardless of which agg/wxPython
          conversion routines are used.

2007-02-21 Applied the PDF backend patch by Nicolas Grilly.
          This impacts several files and directories in matplotlib:

          - Created the directory lib/matplotlib/mpl-data/fonts/pdfcorefonts,
            holding AFM files for the 14 PDF core fonts. These fonts are
            embedded in every PDF viewing application.

          - setup.py: Added the directory pdfcorefonts to package_data.

          - lib/matplotlib/__init__.py: Added the default parameter
            'pdf.use14corefonts'. When True, the PDF backend uses
            only the 14 PDF core fonts.

          - lib/matplotlib/afm.py: Added some keywords found in
            recent AFM files. Added a little workaround to handle
            Euro symbol.

          - lib/matplotlib/fontmanager.py: Added support for the 14
            PDF core fonts. These fonts have a dedicated cache (file
            pdfcorefont.cache), not the same as for other AFM files
            (file .afmfont.cache). Also cleaned comments to conform
            to CODING_GUIDE.

          - lib/matplotlib/backends/backend_pdf.py:
            Added support for 14 PDF core fonts.
            Fixed some issues with incorrect character widths and
            encodings (works only for the most common encoding,
            WinAnsiEncoding, defined by the official PDF Reference).
            Removed parameter 'dpi' because it causes alignment issues.

          -JKS (patch by Nicolas Grilly)

2007-02-17 Changed ft2font.get_charmap, and updated all the files where
          get_charmap is mentioned - ES

2007-02-13 Added barcode demo- JDH

2007-02-13 Added binary colormap to cm - JDH

2007-02-13 Added twiny to pylab - JDH

2007-02-12 Moved data files into lib/matplotlib so that setuptools'
          develop mode works. Re-organized the mpl-data layout so
          that this source structure is maintained in the
          installation. (I.e. the 'fonts' and 'images'
          sub-directories are maintained in site-packages.) Suggest
          removing site-packages/matplotlib/mpl-data and
          ~/.matplotlib/ttffont.cache before installing - ADS

2007-02-07 Committed Rob Hetland's patch for qt4: remove
          references to text()/latin1(), plus some improvements
          to the toolbar layout - DSD

John Hunter wrote:

matplotlib 0.90.1 is out and available for download from the sourceforge site.
  

Just installed it. Works very nicely with the exception of some font issue.

I am getting this:
Could not match Bitstream Vera Serif, New Century Schoolbook, Century Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New Roman, Times, Palatino, Charter, serif, normal, normal. Returning C:\Python25\lib\site-packages\matplotlib\mpl-data\fonts\ttf\Vera.ttf

The only font commands I use are FontProperties(size='smaller') or FontProperties(size=10) as far as I can see.

What do I need to do to get read of this?

I don't just want to change the verbose option.

Any hints very appreciated.
Werner

P.S. John, sorry for the first mail sent to you instead of the list.

···

The 0.90 release is the last release in which we will continue to use
the numerix layer internally and build extensions for Numeric,
numarray and numpy. Goingin forward, we will continue to provide the
numerix compatibility layer for external scripts, and recent versions
of Numeric and numarray should continue to work when passed into mpl,
but we will be compiling extensions against numpy only and importing
it directly internally.

Thanks Charlie Moad for handling the release and binary builds, and to
all the mpl developers who made contributions. See
http://matploltib.sf.net/whats_new.html for a summary of new features,
and the CHANGELOG included below for details. As always, be sure to
consult http://matplotlib.sf.net/API_CHANGES to read about any changes
to the API

http://cheeseshop.python.org/pypi/matplotlib/

http://sourceforge.net/project/showfiles.php?group_id=80706&package_id=82474

===============================================================
2007-06-02 Released 0.90.1 at revision 3352

2007-06-02 Display only meaningful labels when calling legend()
          without args. - NN

2007-06-02 Have errorbar follow the color cycle even if line is not plotted.
          Suppress plotting of errorbar caps for capsize=0. - NN

2007-06-02 Set markers to same alpha value as line. - NN

2007-06-02 Fix mathtext position in svg backend. - NN

2007-06-01 Deprecate Numeric and numarray for use as numerix. Props to
          Travis -- job well done. - ADS

2007-05-18 Added LaTeX unicode support. Enable with the
          'text.latex.unicode' rcParam. This requires the ucs and
          inputenc LaTeX packages. - ADS

2007-04-23 Fixed some problems with polar -- added general polygon
          clipping to clip the lines a nd grids to the polar axes.
          Added support for set_rmax to easily change the maximum
          radial grid. Added support for polar legend - JDH

2007-04-16 Added Figure.autofmt_xdate to handle adjusting the bottom
          and rotating the tick labels for date plots when the ticks
          often overlap - JDH

2007-04-09 Beginnings of usetex support for pdf backend. -JKS

2007-04-07 Fixed legend/LineCollection bug. Added label support
          to collections. - EF

2007-04-06 Removed deprecated support for a float value as a gray-scale;
          now it must be a string, like '0.5'. Added alpha kwarg to
          ColorConverter.to_rgba_list. - EF

2007-04-06 Fixed rotation of ellipses in pdf backend
          (sf bug #1690559) -JKS

2007-04-04 More matshow tweaks; documentation updates; new method
          set_bounds() for formatters and locators. - EF

2007-04-02 Fixed problem with imshow and matshow of integer arrays;
          fixed problems with changes to color autoscaling. - EF

2007-04-01 Made image color autoscaling work correctly with
          a tracking colorbar; norm.autoscale now scales
          unconditionally, while norm.autoscale_None changes
          only None-valued vmin, vmax. - EF

2007-03-31 Added a qt-based subplot-adjustment dialog - DSD

2007-03-30 Fixed a bug in backend_qt4, reported on mpl-dev - DSD

2007-03-26 Removed colorbar_classic from figure.py; fixed bug in
          Figure.clf() in which _axobservers was not getting
          cleared. Modernization and cleanups. - EF

2007-03-26 Refactored some of the units support -- units now live in
          the respective x and y Axis instances. See also
          API_CHANGES for some alterations to the conversion
          interface. JDH

2007-03-25 Fix masked array handling in quiver.py for numpy. (Numeric
          and numarray support for masked arrays is broken in other
          ways when using quiver. I didn't pursue that.) - ADS

2007-03-23 Made font_manager.py close opened files. - JKS

2007-03-22 Made imshow default extent match matshow - EF

2007-03-22 Some more niceties for xcorr -- a maxlags option, normed
          now works for xcorr as well as axorr, usevlines is
          supported, and a zero correlation hline is added. See
          examples/xcorr_demo.py. Thanks Sameer for the patch. -
          JDH

2007-03-21 Axes.vlines and Axes.hlines now create and returns a
          LineCollection, not a list of lines. This is much faster.
          The kwarg signature has changed, so consult the docs.
          Modified Axes.errorbar which uses vlines and hlines. See
          API_CHANGES; the return signature for these three functions
          is now different

2007-03-20 Refactored units support and added new examples - JDH

2007-03-19 Added Mike's units patch - JDH

2007-03-18 Matshow as an Axes method; test version matshow1() in
          pylab; added 'integer' Boolean kwarg to MaxNLocator
          initializer to force ticks at integer locations. - EF

2007-03-17 Preliminary support for clipping to paths agg - JDH

2007-03-17 Text.set_text() accepts anything convertible with '%s' - EF

2007-03-14 Add masked-array support to hist. - EF

2007-03-03 Change barh to take a kwargs dict and pass it to bar.
          Fixes sf bug #1669506.

2007-03-02 Add rc parameter pdf.inheritcolor, which disables all
          color-setting operations in the pdf backend. The idea is
          that you include the resulting file in another program and
          set the colors (both stroke and fill color) there, so you
          can use the same pdf file for e.g. a paper and a
          presentation and have them in the surrounding color. You
          will probably not want to draw figure and axis frames in
          that case, since they would be filled in the same color. - JKS

2007-02-26 Prevent building _wxagg.so with broken Mac OS X wxPython. - ADS

2007-02-23 Require setuptools for Python 2.3 - ADS

2007-02-22 WXAgg accelerator updates - KM
          WXAgg's C++ accelerator has been fixed to use the correct wxBitmap
          constructor.

          The backend has been updated to use new wxPython functionality to
          provide fast blit() animation without the C++ accelerator. This
          requires wxPython 2.8 or later. Previous versions of wxPython can
          use the C++ acclerator or the old pure Python routines.

          setup.py no longer builds the C++ accelerator when wxPython >= 2.8
          is present.

          The blit() method is now faster regardless of which agg/wxPython
          conversion routines are used.

2007-02-21 Applied the PDF backend patch by Nicolas Grilly.
          This impacts several files and directories in matplotlib:

          - Created the directory lib/matplotlib/mpl-data/fonts/pdfcorefonts,
            holding AFM files for the 14 PDF core fonts. These fonts are
            embedded in every PDF viewing application.

          - setup.py: Added the directory pdfcorefonts to package_data.

          - lib/matplotlib/__init__.py: Added the default parameter
            'pdf.use14corefonts'. When True, the PDF backend uses
            only the 14 PDF core fonts.

          - lib/matplotlib/afm.py: Added some keywords found in
            recent AFM files. Added a little workaround to handle
            Euro symbol.

          - lib/matplotlib/fontmanager.py: Added support for the 14
            PDF core fonts. These fonts have a dedicated cache (file
            pdfcorefont.cache), not the same as for other AFM files
            (file .afmfont.cache). Also cleaned comments to conform
            to CODING_GUIDE.

          - lib/matplotlib/backends/backend_pdf.py:
            Added support for 14 PDF core fonts.
            Fixed some issues with incorrect character widths and
            encodings (works only for the most common encoding,
            WinAnsiEncoding, defined by the official PDF Reference).
            Removed parameter 'dpi' because it causes alignment issues.

          -JKS (patch by Nicolas Grilly)

2007-02-17 Changed ft2font.get_charmap, and updated all the files where
          get_charmap is mentioned - ES

2007-02-13 Added barcode demo- JDH

2007-02-13 Added binary colormap to cm - JDH

2007-02-13 Added twiny to pylab - JDH

2007-02-12 Moved data files into lib/matplotlib so that setuptools'
          develop mode works. Re-organized the mpl-data layout so
          that this source structure is maintained in the
          installation. (I.e. the 'fonts' and 'images'
          sub-directories are maintained in site-packages.) Suggest
          removing site-packages/matplotlib/mpl-data and
          ~/.matplotlib/ttffont.cache before installing - ADS

2007-02-07 Committed Rob Hetland's patch for qt4: remove
          references to text()/latin1(), plus some improvements
          to the toolbar layout - DSD

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

make sure you are picking up the most recent matplotlibrc. We changed
the font ordering some time ago. Then run with --verbose-helpful and
post the output, maybe --verbose-debug, and we will see if we can
figure out what is going on. I haven't run under windows for some
time.

···

On 6/4/07, Werner F. Bruhin <werner.bruhin@...185...> wrote:

John Hunter wrote:
> matplotlib 0.90.1 is out and available for download from the sourceforge site.
>
Just installed it. Works very nicely with the exception of some font
issue.

I am getting this:
Could not match Bitstream Vera Serif, New Century Schoolbook, Century
Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times
New Roman, Times, Palatino, Charter, serif, normal, normal. Returning
C:\Python25\lib\site-packages\matplotlib\mpl-data\fonts\ttf\Vera.ttf

John,

John Hunter wrote:

John Hunter wrote:
> matplotlib 0.90.1 is out and available for download from the sourceforge site.
>
Just installed it. Works very nicely with the exception of some font
issue.

I am getting this:
Could not match Bitstream Vera Serif, New Century Schoolbook, Century
Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times
New Roman, Times, Palatino, Charter, serif, normal, normal. Returning
C:\Python25\lib\site-packages\matplotlib\mpl-data\fonts\ttf\Vera.ttf

make sure you are picking up the most recent matplotlibrc.

I don't have a custom rc file, i.e. this is with the 0.90.1 installed matplotlibrc.

  We changed
the font ordering some time ago. Then run with --verbose-helpful and
post the output, maybe --verbose-debug, and we will see if we can
figure out what is going on. I haven't run under windows for some
time.

I attached the verbose-debug output.

Maybe to do with the fontcache? Will try this in a moment and let you know if it corrected the issue.

Werner

stdoutlog.txt (12 KB)

···

On 6/4/07, Werner F. Bruhin <werner.bruhin@...185...> wrote:

John,

John Hunter wrote:

ttffont.cache (39.2 KB)

···

On 6/4/07, Werner F. Bruhin <werner.bruhin@...185...> wrote:

John Hunter wrote:
> matplotlib 0.90.1 is out and available for download from the sourceforge site.
>
Just installed it. Works very nicely with the exception of some font
issue.

I am getting this:
Could not match Bitstream Vera Serif, New Century Schoolbook, Century
Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times
New Roman, Times, Palatino, Charter, serif, normal, normal. Returning
C:\Python25\lib\site-packages\matplotlib\mpl-data\fonts\ttf\Vera.ttf

make sure you are picking up the most recent matplotlibrc. We changed
the font ordering some time ago. Then run with --verbose-helpful and
post the output, maybe --verbose-debug, and we will see if we can
figure out what is going on. I haven't run under windows for some
time.

Works the first time after I removed the cache file. Looking at the file it might have something to do with Unicode, i.e. one of the two "/" is encoded as 'u0005C', see attached file.

Werner

John Hunter wrote:

matplotlib 0.90.1 is out and available for download from the sourceforge site.
  

When trying to package my application with py2exe I get the following error:

Traceback (most recent call last):
  File "setup.py", line 141, in <module>
    mpdir, mpfiles = matplotlib.get_py2exe_datafiles()
  File "C:\Python25\Lib\site-packages\matplotlib\__init__.py", line 369, in get_py2exe_datafiles
    mplfiles.remove(os.sep.join([get_data_path(), 'Matplotlib.nib']))
ValueError: list.remove(x): x not in list

Werner

Werner F. Bruhin wrote:

John Hunter wrote:
  

matplotlib 0.90.1 is out and available for download from the sourceforge site.
  

When trying to package my application with py2exe I get the following error:

Traceback (most recent call last):
  File "setup.py", line 141, in <module>
    mpdir, mpfiles = matplotlib.get_py2exe_datafiles()
  File "C:\Python25\Lib\site-packages\matplotlib\__init__.py", line 369, in get_py2exe_datafiles
    mplfiles.remove(os.sep.join([get_data_path(), 'Matplotlib.nib']))
ValueError: list.remove(x): x not in list
  

To work around this I just put a try/except in:
    try:
        # Need to explicitly remove cocoa_agg files or py2exe complains
        mplfiles.remove(os.sep.join([get_data_path(), 'Matplotlib.nib']))
    except:
        pass

But I then get this error:
error: can't copy 'C:\Python25\lib\site-packages\matplotlib\mpl-data\fonts': doesn't exist or not a regular file

I guess I will have to review how I am using the get_py2exe_datafiles stuff.

Werner

Dear Werner,

This seems to be an unintended side-effect of reorganizing the mpl data file location that I did prior to this release. (I.e. it's not your code that broke, I think it's mpl.) Unfortunately, since I didn't (and still don't) use py2exe, it will be hard for me to fix this. Can you send a patch that gets py2exe working again?

Thanks,
Andrew

Werner F. Bruhin wrote:

···

Werner F. Bruhin wrote:
  

John Hunter wrote:
  

matplotlib 0.90.1 is out and available for download from the sourceforge site.
  

When trying to package my application with py2exe I get the following error:

Traceback (most recent call last):
  File "setup.py", line 141, in <module>
    mpdir, mpfiles = matplotlib.get_py2exe_datafiles()
  File "C:\Python25\Lib\site-packages\matplotlib\__init__.py", line 369, in get_py2exe_datafiles
    mplfiles.remove(os.sep.join([get_data_path(), 'Matplotlib.nib']))
ValueError: list.remove(x): x not in list
  

To work around this I just put a try/except in:
    try:
        # Need to explicitly remove cocoa_agg files or py2exe complains
        mplfiles.remove(os.sep.join([get_data_path(), 'Matplotlib.nib']))
    except:
        pass

But I then get this error:
error: can't copy 'C:\Python25\lib\site-packages\matplotlib\mpl-data\fonts': doesn't exist or not a regular file

I guess I will have to review how I am using the get_py2exe_datafiles stuff.

Werner

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Hi Andrew,

Andrew Straw wrote:

Dear Werner,

This seems to be an unintended side-effect of reorganizing the mpl data file location that I did prior to this release. (I.e. it's not your code that broke, I think it's mpl.) Unfortunately, since I didn't (and still don't) use py2exe, it will be hard for me to fix this. Can you send a patch that gets py2exe working again?

The work around I did is using glob.glob instead as follows:

# matplotlib data
##mpdir, mpfiles = matplotlib.get_py2exe_datafiles()
mpfiles = glob.glob('C:\Python25\lib\site-packages\matplotlib\mpl-data\*.*')

But I can't confirm yet that this works as I am also trying out something else in my InnoSetup script. Will confirm ASAP and will try and look into matplotlib.get_py2exe_datafiles() and see how it could be fixed.

Best regards
Werner

Hi Andrew,

Werner F. Bruhin wrote:

Hi Andrew,

Andrew Straw wrote:
  

Dear Werner,

This seems to be an unintended side-effect of reorganizing the mpl data file location that I did prior to this release. (I.e. it's not your code that broke, I think it's mpl.) Unfortunately, since I didn't (and still don't) use py2exe, it will be hard for me to fix this. Can you send a patch that gets py2exe working again?
    

The work around I did is using glob.glob instead as follows:

# matplotlib data
##mpdir, mpfiles = matplotlib.get_py2exe_datafiles()
mpfiles = glob.glob('C:\Python25\lib\site-packages\matplotlib\mpl-data\*.*')

But I can't confirm yet that this works as I am also trying out something else in my InnoSetup script. Will confirm ASAP and will try and look into matplotlib.get_py2exe_datafiles() and see how it could be fixed.
  

I have change matplotlib.get_py2exe_datafiles() to:
def get_py2exe_datafiles():
    import glob
       mplfiles = []
    for item in glob.glob(os.sep.join([get_data_path(), '*/*'])):
        if os.path.isdir(item):
            mplfiles += glob.glob(os.sep.join([item, '/*']))
               mplfiles.append(os.sep.join([get_data_path(), 'matplotlibrc']))

    try:
        mplfiles.remove(os.sep.join([get_data_path(), 'Matplotlib.nib']))
    except:
        pass

    return ('matplotlibdata', mplfiles)

Now this creates a "flat" folder, i.e. all datafiles are directly under matplotlibdata. In my tests this works for me in my limited tests, with the exception that I also get the "Could not match Bitstream Vera ......etc" error - but this is something I also get with py2exe, so I don't know if this is an issue.

Andrew, do you know if the sub-folder structure should be retained when using py2exe for matplotlib to work correctly in all circumstances? If that would be the case let me know and I try to come up with something.

Werner

Werner F. Bruhin wrote:

Hi Andrew,

Werner F. Bruhin wrote:
  

Hi Andrew,

Andrew Straw wrote:
  

Dear Werner,

This seems to be an unintended side-effect of reorganizing the mpl data file location that I did prior to this release. (I.e. it's not your code that broke, I think it's mpl.) Unfortunately, since I didn't (and still don't) use py2exe, it will be hard for me to fix this. Can you send a patch that gets py2exe working again?
    

The work around I did is using glob.glob instead as follows:

# matplotlib data
##mpdir, mpfiles = matplotlib.get_py2exe_datafiles()
mpfiles = glob.glob('C:\Python25\lib\site-packages\matplotlib\mpl-data\*.*')

But I can't confirm yet that this works as I am also trying out something else in my InnoSetup script. Will confirm ASAP and will try and look into matplotlib.get_py2exe_datafiles() and see how it could be fixed.
  

I have change matplotlib.get_py2exe_datafiles() to:
def get_py2exe_datafiles():
    import glob
       mplfiles = []
    for item in glob.glob(os.sep.join([get_data_path(), '*/*'])):
        if os.path.isdir(item):
            mplfiles += glob.glob(os.sep.join([item, '/*']))
               mplfiles.append(os.sep.join([get_data_path(), 'matplotlibrc']))

    try:
        mplfiles.remove(os.sep.join([get_data_path(), 'Matplotlib.nib']))
    except:
        pass

    return ('matplotlibdata', mplfiles)

Now this creates a "flat" folder, i.e. all datafiles are directly under matplotlibdata. In my tests this works for me in my limited tests, with the exception that I also get the "Could not match Bitstream Vera ......etc" error - but this is something I also get with py2exe, so I don't know if this is an issue.

Andrew, do you know if the sub-folder structure should be retained when using py2exe for matplotlib to work correctly in all circumstances? If that would be the case let me know and I try to come up with something.

Dear Werner,

I am reluctant to eliminate the sub-folder structure because I think it would add the possibility of unnecessary bugs to just the py2exe built version. Would it be possible for you to re-factor this to include the directory layout? When you test it, can you test some interactive plot to make sure all the button icons are loaded properly?

Thanks,
Andrew

Hi Andrew,

Andrew Straw wrote:

...
Dear Werner,

I am reluctant to eliminate the sub-folder structure because I think it would add the possibility of unnecessary bugs to just the py2exe built version. Would it be possible for you to re-factor this to include the directory layout? When you test it, can you test some interactive plot to make sure all the button icons are loaded properly?

I don't know how to change "matplotlib.get_py2exe_datafiles()" to retain the folder structure. But in the attached setup.py I used "matplotlib.get_data_path()" for each of the sub-folders and then define the folder structure again in the py2exe "data_files" section. The enclosed setup.py builds an exe for embedding_in_wx.py and I have no problems running it and the toolbar shows all its icons.

I am also enclosing some example files which I have upgraded to the new wxPython namespace - I had sent them some time ago but the examples.zip file I just downloaded contains the old versions.

dynamic_demo_wx.py, namespace changes and a OnClose event to stop the timer (otherwise the script can not be stopped by clicking on the X).
dynamic_image_wxagg.py, namespace changes
dynamic_image_wxagg2.py, namespace changes and removed numarray stuff.
embedding_in_wx.py, namespace changes
embedding_in_wx2.py, namespace changes
embedding_in_wx4.py, namespace changes

Can you update the zip file with the above files?

Best regards
Werner

embedding_in_wx4.py (3.7 KB)

dynamic_demo_wx.py (4.04 KB)

dynamic_image_wxagg.py (3.51 KB)

dynamic_image_wxagg2.py (3.18 KB)

embedding_in_wx.py (3.41 KB)

embedding_in_wx2.py (2.56 KB)

setup.py (4.35 KB)

Hi John,

Werner F. Bruhin wrote:

John,

John Hunter wrote:

John Hunter wrote:
> matplotlib 0.90.1 is out and available for download from the sourceforge site.
>
Just installed it. Works very nicely with the exception of some font
issue.

I am getting this:
Could not match Bitstream Vera Serif, New Century Schoolbook, Century
Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times
New Roman, Times, Palatino, Charter, serif, normal, normal. Returning
C:\Python25\lib\site-packages\matplotlib\mpl-data\fonts\ttf\Vera.ttf

Is there any solution to the above issue yet?

Best regards
Werner

···

On 6/4/07, Werner F. Bruhin <werner.bruhin@...185...> wrote:

>>> I am getting this:
>>> Could not match Bitstream Vera Serif, New Century Schoolbook, Century
>>> Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times
>>> New Roman, Times, Palatino, Charter, serif, normal, normal. Returning
>>> C:\Python25\lib\site-packages\matplotlib\mpl-data\fonts\ttf\Vera.ttf
Is there any solution to the above issue yet?

In your earlier post in this thread you said:

Works the first time after I removed the cache file. Looking at the
file it might have something to do with Unicode, i.e. one of the two "/"
is encoded as 'u0005C', see attached file.

I thought that removing the cache file and rerunning fixed our
problem. What am I missing?

JDH

···

On 6/14/07, Werner F. Bruhin <werner.bruhin@...185...> wrote:

John,

John Hunter wrote:

···

On 6/14/07, Werner F. Bruhin <werner.bruhin@...185...> wrote:

>>> I am getting this:
>>> Could not match Bitstream Vera Serif, New Century Schoolbook, Century
>>> Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times
>>> New Roman, Times, Palatino, Charter, serif, normal, normal. Returning
>>> C:\Python25\lib\site-packages\matplotlib\mpl-data\fonts\ttf\Vera.ttf
Is there any solution to the above issue yet?

In your earlier post in this thread you said:

Works the first time after I removed the cache file. Looking at the
file it might have something to do with Unicode, i.e. one of the two "/"
is encoded as 'u0005C', see attached file.

I thought that removing the cache file and rerunning fixed our
problem. What am I missing?

It "fixes it" only for the current run. If I stop and start the program, i.e. use the newly build cache file I see the same problem again.

For the moment I work around it by just setting verbose to silent.

Best regards
Werner