cp gnuplot gnuplot.bak
Rename it to gnuplot1:
mv gnuplot gnuplot1
Now create the script gnuplot by typing
emacs gnuplot
Create this script:
#!/bin/bash
/usr/bin/gnuplot1 -background white
Add execution permission through chmod +x gnuplot
It will make a standard call to gnuplot change to gnuplot -background white, which will change your plots background in octave.
If you have a better way to do this, please leave me a comment
Have fun :)
6 comments:
It's so simple, am kicking myself now. Nice one. Thanks.
Hi Daniel,
It's a good idea. Work when I type figure on octave (an withe bkground figure appears), but when a try to plot, type plot(x), the command line go to gnuplot prompt.
And a message is showed:
Terminal type set to 'wxt'
Additional information:
distro: debian
octave 2.9
gnuplot 4.2
Any idea?
Henrique
http://staticwiki.ubuntuusers.de/Gnuplot
The "correct" way to do it is to specify the X resource for Gnuplot's background.
# do this once
echo "gnuplot*background: lavender" >> ~/.Xresources
# do this on login
xrdb -merge ~/.Xresources
I found that the .Xresources trick worked when invoking gnuplot directly, but did not work when octave invoked gnuplot. However, the following worked in octave 3.4.3:
set(gcf, 'color', [0 0 0]) # to set to black
Post a Comment