I've added an icon for use for when matplotlib windows are minimized and chose an arbitrary icon (back.svg) to get it working on the GTK+ backend. Since the icon has to be resized to fit in the panel, and svg are good at resizing, I used svg instead of the usual png format (png or other formats could be used instead if required). John, if you can find/create a suitable matplotlib icon just copy it to images/matplotlib.svg and overwrite the existing icon file. Regards, Steve
>>>>> "Steve" == Steve Chaplin <ste...@ya...> writes: Steve> I've added an icon for use for when matplotlib windows are Steve> minimized and chose an arbitrary icon (back.svg) to get it Steve> working on the GTK+ backend. Since the icon has to be Steve> resized to fit in the panel, and svg are good at resizing, Steve> I used svg instead of the usual png format (png or other Steve> formats could be used instead if required). Steve> John, if you can find/create a suitable matplotlib icon Steve> just copy it to images/matplotlib.svg and overwrite the Steve> existing icon file. I had the bright idea to use the svg backend to generate the minimization icon. See examples/matplotlib_icon.svg. It displays correctly on my web browser, but not when minimized. I don't know if this reflects a problem in the svg backend, or how gtk handles svg icons. If we can get this example to work, the next thing to do is connect the icon setting to the window minimize event, and set the icon to be the svg output of the current figure window! JDH
On Tue, 2004年07月27日 at 04:36, John Hunter wrote: > > I had the bright idea to use the svg backend to generate the > minimization icon. See examples/matplotlib_icon.svg. It displays > correctly on my web browser, but not when minimized. I don't know if > this reflects a problem in the svg backend, or how gtk handles svg > icons. > > If we can get this example to work, the next thing to do is connect > the icon setting to the window minimize event, and set the icon to be > the svg output of the current figure window! > > JDH I viewed matplotlib.svg in gqview (on Linux) and it looks like the icon image only uses about two thirds of the svg width and height, so the minimize icon ends up being too small. Steve
>>>>> "Steve" == Steve Chaplin <ste...@ya...> writes: Steve> I viewed matplotlib.svg in gqview (on Linux) and it looks Steve> like the icon image only uses about two thirds of the svg Steve> width and height, so the minimize icon ends up being too Steve> small. Indeed. I fixed this in CVS (and a number of other fixes for SVG including some layout problems, image support and font support). There appears to be a problem with the svg lib gnome uses. For one thing, the axes appear black even though the hex code is #ffffff. This does not happen in mozilla with the adobe plugin or with batik. It appears GNOME uses the same lib (unsurprisingly) because when I minimize the figure I also get the black axes background. JDH