client-side image maps

A few weeks ago I asked about using matplotlib to make a

    > simple client-side image map for a web page.

Hmm, I missed this post somehow. Sorry to have ignored you :frowning: It
looks like you did just fine w/o me

    > I since figured out my problem. I wrote an set of essays
    > on it. The most relevant is at
    > Index of /writings/diary/archive/2005/04/24
    > interactive_html.html

A friend was just pestering me to add support for this for his
business. Thanks for figuring it out! The articles are very nice;
I'll be sure to link to them from the mpl web site.

A few comments:

    > They can be used together, as you might have seen in my code from last time.

The link
http://www.dalkescientific.com/writings/diary/archive/2005/04/22/matplotlib
associated with the text "my code from last time" is stale.

  > Most image formats are in pixels, and the number of pixels
  > in an inch depends on the screen size, resolution, and even
  > the distance to the screen. The conversion to pixels is done
  > by the print_figure() call, which is why it takes the dpi
  > parameter. Looking at the library code I see that the
  > Figure() constructor also takes a dpi parameter. I don't
  > know when it's used.

It is used when building the GUI window (eg dpi should reflect your
screen dpi). It is not used for hardcopy, because the print_figure
dpi setting overrides it.

  > I can't find any place in matplotlib that gives the final
  > image size in pixels. I think the right place is to have
  > print_figure() return a data structure with information
  > about what it just printed (image size, perhaps the number
  > of bytes). But it doesn't so I'll compute it myself.

A good idea. Could I trouble you to fill out a support request at
http://sourceforge.net/tracker/?group_id=80706&atid=560721 . This is
something that takes more that just a minute to fix because it has to
be done on each backend, so having it on the support requests page
will help prevent us from forgetting to do it.

Thanks for the articles -- they are very helpful.

JDH