I am using
http://gnuplot.sourceforge.net/development/binaries/gp45-20110525-win-mingw.zip,
and have encountered the following bug when trying to change the text
and line colors to be suitable for a dark background using the emf
(enhanced metafile) terminal:
When running the following script, the textcolors of the title, labels
and the key are not kept by gnuplot, but reset to black, although the
command "show title/xlabel/ylabel/key" will claim that the color is
still set to rgb "white". I have to restart gnuplot to produce several
emf plots with a white background. I haven't tried this for different
terminals, yet.
Any ideas?
Tristan
**** Start of Script ****
set title "Some title"
set xlabel "Some xlabel"
set ylabel "Some ylabel"
set grid
set style data linespoints
set key right top
set border linecolor rgb "white"
set grid linecolor rgb "white"
set xtics textcolor rgb "white"
set ytics textcolor rgb "white"
set title textcolor rgb "white"
set xlabel textcolor rgb "white"
set ylabel textcolor rgb "white"
set key textcolor rgb "white"
set terminal emf color enhanced 22
set output "ItWorksHere.emf"
plot sin(x) t "Sinus" lw 2, cos(x) t "Cosinus" lw 2
set output "ItsBlackAgain.emf"
replot
**** End of Script ****
> Hi,
>
> I am using
> http://gnuplot.sourceforge.net/development/binaries/gp45-20110525-win-mingw.zip,
> and have encountered the following bug when trying to change the text
> and line colors to be suitable for a dark background using the emf
> (enhanced metafile) terminal:
>
> When running the following script, the textcolors of the title, labels
> and the key are not kept by gnuplot, but reset to black, although the
> command "show title/xlabel/ylabel/key" will claim that the color is
> still set to rgb "white". I have to restart gnuplot to produce several
> emf plots with a white background. I haven't tried this for different
> terminals, yet.
>
>
> Any ideas?
Thank you for the bug report.
This issue is now fixed in the upstream source code.
The cause of the problem is that the program thinks it knows what was the
last color used for drawing, and if the current draw command uses the same
color then it doesn't bother to re-send the color information. What is
happening in your case is that the "last color used" was actually in the
previous plot and hence the information is out of date.
As a work-around:
Add some harmless command that will affect the "last color used".
A possible example:
set label 99 "." at graph 0, graph 0 front textcolor bgnd
Ethan