|
From: | David Bateman |
Subject: | Re: how to set colors of axes and tic marks? |
Date: | Fri, 14 May 2010 08:47:38 +0200 |
User-agent: | Mozilla-Thunderbird 2.0.0.22 (X11/20090706) |
Yuliang Wang wrote:
I found that if I run octave in a terminal with dark background and light foreground, then the output of a plot command shows only the plot itself, not the axes and tic marks. The background of the plot is black, too. I think the reason is that the default colors of axes and tic marks are black, and they are indistinguishable from the black background. However, if I run gnuplot in the same terminal, the output is normal: light background and black axes. Since octave plot commands evoke gnuplot, I don't see where the problem is.
Octave needs to set the axes color to complement the background color and it currently doesn't.. Something as simple as
fprintf (plot_stream, "set border linecolor rgb \"#%02x%02x%02x\"\n", 255 * (1 - bg));
should do it. That being said, the development version will set the default background to white rather than leaving it undefined and you should see your plot..
One difficult in seting the axes color to complement the background color is that is not what matlab does.. In matlab the axes and tic marks are set to the same color as the adjacent text on the axis with the axis {x,y,z}color properties. This means that color of the axes and tic marks are different for each axis.. Gnuplot can't do that so better to just use {x,y,z}color to set the color of the text on the axes and set the axes to complement the background color. Alternatively we might add an octave specific property to the axes properties to define the color. I've been working on an implementation of the whitebg function that uses the first method...
D.
[Prev in Thread] | Current Thread | [Next in Thread] |