How to save image without showing?

Please email the list directly or CC it so others can benefit from the
discussion. For reason unclear to me, my posts to the list are held
up in some nebulous zone for many hours....

    > I created image with GD library. I had 2 small issues: I
    > add GDFONTPATH and while running from web server TTFQuery
    > wanted to create a font
    > "./usr/lib/python2.3/site-packages/ttfquery/font.cache" and
    > it did not had permission. I simply created this file with
    > write permission.

It looks like you are running in an environment where HOME is not set.
The TTFQuery file first checks for the HOME
environment variable and tries to put the font cache there. If it
fails, it falls back on a python dir (which works well for linux and
win32 respectively). Also, make sure you are using version 0.2.6 of

So either 1) set HOME to point to where you want to font cache to go,
or 2) Edit and manually set the registryFile
variable at the top of that script.

    > Unfortunately I cannot put my stuff on public internet
    > because I am working on my development machine which is
    > inside my companies firewall and I have to create some good
    > graphics forms for user to use it. I am planning to do both
    > things withing a month or so. But I will be glad to
    > transfer whatever knowledge and programs I have to start
    > you on publishing graph on web.

I understand. If you have a publicly viewable screenshot that you can
share for the screenshot page, let me know. Otherwise, just pass on
what you learn about the mechanics of getting it up and running.

John Hunter

Commented out line 43 in _matlab_helpers fix my issue. Is it because I don't
have any window to destroy?

Here is small example (which creates problem without commenting line 43)

from matplotlib import use
from matplotlib.matlab import *
bar([0,1], [0,2])
savefig('test.png', dpi=100)

bar([0,1], [1,1])
savefig('test1.png', dpi=100)

********************New destroy function in _matlab_helpers (Need a fix if you
have window to destroy



    def destroy(num):
        if not GcfBase.has_fignum(num): return
        figwin = GcfBase.figs[num]

        oldQue = GcfBase._activeQue[:]
        GcfBase._activeQue = []
        for f in oldQue:
            if f != figwin: GcfBase._activeQue.append(f)

        del GcfBase.figs[num]
    destroy = staticmethod(destroy)