octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: color "none" for figures


From: Thorsten Meyer
Subject: Re: color "none" for figures
Date: Sun, 07 Feb 2010 16:55:28 +0100
User-agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090706)



Shai Ayal wrote:
On Sat, Feb 6, 2010 at 10:20 PM, Thorsten Meyer <address@hidden> wrote:
  
Hi,

attached is a little patch, which allows a value of "none" for the "color"
property of a figure.
Example:
plot(1,1)
set(gcf, "color", [1 0 0]); # yellow background
set(gcf, "color", "none");  # transparent background

With the gnuplot backend, it allows to set the background of a figure
transparent (this used to be the default before patch 1e38d9ed1e28). Doing this
will also remove the black edge around the plot.

With the fltk backend (and the patch applied), setting the figure color to
"none" does not change the color drawn. However, it doesn't give an error
message either (while a random string does):
lt-octave:1> backend("fltk")
lt-octave:2> plot(2,1)
lt-octave:4> set(gcf, "color", "blue");  # blue background
lt-octave:5> set(gcf, "color", "none").  # background stays blue
lt-octave:6> set(gcf, "color", "blibla")
error: invalid color specification: blibla
error: invalid value for color property "color" (value = blibla)

Can somebody give me a hint, where this fltk problem could be fixed in the sources?

    
When you say the background is transparent, do you mean on-screen, or
in the "printed" off-screen file. In what file types did this work?
  
I was mainly concerned about the on-screen appearance of a plot. At the moment, there is bug in the gnuplot backend that leads to the figure background hiding part of a plot under certain circumstances (see my bug report from 02/06/2010 8:53). Trying to debug that bug I thought, it should be possible to switch off the explicit drawing of a figure background altogether (and found that it is as easy as the patch above...).

Actually, for the gnuplot backend, not drawing a figure background doesn't seem to make any difference e.g. in a gif image printed of the plot. I don't know if gnuplot is capable of producing e.g. gif images with transparent background.
But thinking about it: yes eventually, I would like it very much to be able to get image files with transparent background. I have missed transparent octave images several times when preparing a presentation.

regards

Thorsten


reply via email to

[Prev in Thread] Current Thread [Next in Thread]