|
View:
New views
7 Messages
—
Rating Filter:
Alert me
|
|
|
axis colors override xrdbHi,
I'm using Octave 3.0.1 (Ubuntu), and gnuplot 4.2 patchlevel 4. I would prefer to have my plots be white-on-black. As I understand, gnuplot does not support changing the background color, in general. So I am using xrdb to set the background in the x11 terminal. I am also specifying gnuplot*borderColor (and tried *textColor and *axisColor, to no evident impact). In gnuplot, the color of the border, legend, and axis labels all take the value from *borderColor. In Octave, the border and legend behave as in gnuplot, but the axis labels remain black. I have not been able to discover how to specify the color of the axis labels. If I knew that I would be happy enough. At the same time, it would be ideal if Octave would allow gnuplot to use the default colors. Let me know if I can help solve this problem. |
|
|
Re: axis colors override xrdbThis patch uses gnuplot's default colours for the axes, and possibly other cases. It would be better to set a non-empty colorspec string iff the user has asked to change the axes colours, but I don't understand the code well enough to do that. <pre> diff -u __go_draw_axes__.m.orig __go_draw_axes__.m --- __go_draw_axes__.m.orig 2009-08-20 14:52:20.000000000 -0400 +++ __go_draw_axes__.m 2009-08-20 14:43:26.000000000 -0400 @@ -1590,9 +1590,12 @@ if (mono) colorspec = ""; else - colorspec = sprintf ("textcolor rgb \"#%02x%02x%02x\"", - round (255*color)); + % don't fuss with the axis colours, let gnuplot do that. + %colorspec = sprintf ("textcolor rgb \"#%02x%02x%02x\"", + % round (255*color)); + colorspec = ""; endif else typ = get_old_gnuplot_color (color); colorspec = sprintf ("textcolor lt %d", typ); </pre> |
|
|
Re: axis colors override xrdbOn Aug 20, 2009, at 2:54 PM, roger_wilco wrote: > roger_wilco wrote: >> >> I have not been able to discover how to specify the color of the axis >> labels. If I knew that I would be happy enough. At the same time, >> it >> would be ideal if Octave would allow gnuplot to use the default >> colors. >> > > This patch uses gnuplot's default colours for the axes, and possibly > other > cases. It would be better to set a non-empty colorspec string iff > the user > has asked to change the axes colours, but I don't understand the > code well > enough to do that. > > <pre> > diff -u __go_draw_axes__.m.orig __go_draw_axes__.m > --- __go_draw_axes__.m.orig 2009-08-20 14:52:20.000000000 -0400 > +++ __go_draw_axes__.m 2009-08-20 14:43:26.000000000 -0400 > @@ -1590,9 +1590,12 @@ > if (mono) > colorspec = ""; > else > - colorspec = sprintf ("textcolor rgb \"#%02x%02x%02x\"", > - round (255*color)); > + % don't fuss with the axis colours, let gnuplot do that. > + %colorspec = sprintf ("textcolor rgb \"#%02x%02x%02x\"", > + % round (255*color)); > + colorspec = ""; > endif > else > typ = get_old_gnuplot_color (color); > colorspec = sprintf ("textcolor lt %d", typ); > </pre> Roger, Octave's current sources have changed a lot since 3.0.x. I recommend you upgrade. Regarding how to produce a plot on a black background, we'd prefer to find a solution that is compatible with Matlab. With Matlab, the following produces a blue line on a black background with the axes' lines and labels drawn in white.. plot (1:10) set (gca, 'color', [0 0 0]) set (gcf, 'color', [0 0 0]) set (gca,'xcolor',[1 1 1],'ycolor',[1 1 1]) None of the "set" commands result in the compatible changes for Octave (perhaps 3 patches are needed?). If you have the time, your help in fixing this problem would be appreciated. Regarding _______________________________________________ Bug-octave mailing list Bug-octave@... https://www-old.cae.wisc.edu/mailman/listinfo/bug-octave |
|
|
Re: axis colors override xrdbOn 21-Aug-2009, Ben Abbott wrote:
| Regarding how to produce a plot on a black background, we'd prefer to | find a solution that is compatible with Matlab. With Matlab, the | following produces a blue line on a black background with the axes' | lines and labels drawn in white.. | | plot (1:10) | set (gca, 'color', [0 0 0]) | set (gcf, 'color', [0 0 0]) | set (gca,'xcolor',[1 1 1],'ycolor',[1 1 1]) | | None of the "set" commands result in the compatible changes for Octave | (perhaps 3 patches are needed?). | | If you have the time, your help in fixing this problem would be | appreciated. If you want this to work when using the gnuplot backend, I suspect it will require some changes to gnuplot. Or is there already some way to change the terminal background color using gnuplot commands that I'm not aware of? The gnuplot backend is pretty good, but has some serious limitations. Maybe it is time to start putting more thought and effort into the OpenGL backend instead? jwe _______________________________________________ Bug-octave mailing list Bug-octave@... https://www-old.cae.wisc.edu/mailman/listinfo/bug-octave |
|
|
Re: axis colors override xrdbOn Aug 26, 2009, at 10:04 PM, John W. Eaton wrote: > On 21-Aug-2009, Ben Abbott wrote: > > | Regarding how to produce a plot on a black background, we'd prefer > to > | find a solution that is compatible with Matlab. With Matlab, the > | following produces a blue line on a black background with the axes' > | lines and labels drawn in white.. > | > | plot (1:10) > | set (gca, 'color', [0 0 0]) > | set (gcf, 'color', [0 0 0]) > | set (gca,'xcolor',[1 1 1],'ycolor',[1 1 1]) > | > | None of the "set" commands result in the compatible changes for > Octave > | (perhaps 3 patches are needed?). > | > | If you have the time, your help in fixing this problem would be > | appreciated. > > If you want this to work when using the gnuplot backend, I suspect it > will require some changes to gnuplot. Or is there already some way to > change the terminal background color using gnuplot commands that I'm > not aware of? > > The gnuplot backend is pretty good, but has some serious limitations. > Maybe it is time to start putting more thought and effort into the > OpenGL backend instead? > > jwe Regarding the gnuplot backend, Petr Mikulik emailed me the suggestion below. > This functionality can be implemented by the following gnuplot > commands: > > # Screen background: > # set (gcf, 'color', [0 1 0]) > set object 1 rect from screen 0,screen 0 to screen 1,screen 1 back > set object 1 rect fc rgb "#00FF00" fillstyle solid 1.0 > > # Graph background: > # set (gca, 'color', [1 0 0]) > set object 2 rect from graph 0,graph 0 to graph 1,graph 1 back > set object 2 rect fc rgb "#FF0000" fillstyle solid 1.0 > > plot x with line lt 3 Ben _______________________________________________ Bug-octave mailing list Bug-octave@... https://www-old.cae.wisc.edu/mailman/listinfo/bug-octave |
|
|
Re: axis colors override xrdbOn 26-Aug-2009, Ben Abbott wrote:
| Regarding the gnuplot backend, Petr Mikulik emailed me the suggestion | below. | | > This functionality can be implemented by the following gnuplot | > commands: | > | > # Screen background: | > # set (gcf, 'color', [0 1 0]) | > set object 1 rect from screen 0,screen 0 to screen 1,screen 1 back | > set object 1 rect fc rgb "#00FF00" fillstyle solid 1.0 | > | > # Graph background: | > # set (gca, 'color', [1 0 0]) | > set object 2 rect from graph 0,graph 0 to graph 1,graph 1 back | > set object 2 rect fc rgb "#FF0000" fillstyle solid 1.0 | > | > plot x with line lt 3 When I do this with gnuplot 4.2.5, the tics and labels don't appear, at least with the wxt terminal. BTW, your earlier commands plot (1:10) set (gca, 'color', [0 0 0]) set (gcf, 'color', [0 0 0]) set (gca,'xcolor',[1 1 1],'ycolor',[1 1 1]) already appear to work correctly with the fltk/opengl backend in Octave 3.2.2. With the current development sources, the axis labels are also rendered in the correct color (they are not implemented in 3.2.2). So I'd still like to see us putting more work into the fltk/opengl backend as it is nearly usable now, and with a little work could be very nice, probably faster than the gnuplot backend, would allow for easier direct interaction with the plot using the mouse (for example, it should be easier to update axes properties when the plot is changed interactively with the mouse). jwe _______________________________________________ Bug-octave mailing list Bug-octave@... https://www-old.cae.wisc.edu/mailman/listinfo/bug-octave |
|
|
Re: axis colors override xrdb> | Regarding the gnuplot backend, Petr Mikulik emailed me the suggestion
> | below. > | > | > This functionality can be implemented by the following gnuplot > | > commands: > | > > | > # Screen background: > | > # set (gcf, 'color', [0 1 0]) > | > set object 1 rect from screen 0,screen 0 to screen 1,screen 1 back > | > set object 1 rect fc rgb "#00FF00" fillstyle solid 1.0 > | > > | > # Graph background: > | > # set (gca, 'color', [1 0 0]) > | > set object 2 rect from graph 0,graph 0 to graph 1,graph 1 back > | > set object 2 rect fc rgb "#FF0000" fillstyle solid 1.0 > | > > | > plot x with line lt 3 > > When I do this with gnuplot 4.2.5, the tics and labels don't appear, > at least with the wxt terminal. Then the following is needed as well: set grid front; unset grid --- PM _______________________________________________ Bug-octave mailing list Bug-octave@... https://www-old.cae.wisc.edu/mailman/listinfo/bug-octave |
| Free embeddable forum powered by Nabble | Forum Help |