|
From: Ethan A M. <eam...@gm...> - 2018-02-07 18:17:44
|
On Wednesday, 07 February 2018 17:20:31 Daniel Boles wrote: > Hi, > > Take the following script, minimally modified from > https://stackoverflow.com/a/30832843 > > set terminal svg background rgb 'black' > > set output 'bw.svg' > > > > set xlabel 'ylabel' tc rgb 'white' > > set ylabel 'xlabel' tc rgb 'white' > > set border lc rgb 'white' > > set key tc rgb 'white' > > > > set linetype 1 lc rgb 'white' > > plot x lc 1, x**2 lc 1 > > > > It renders an SVG with a black background and white everything else. > > Now add "mousing" to the "set terminal" line. > > That results in the background being lost, so everything is white on white, > and thus invisible. Yes. That seems to be a bug. > It looks like the code that creates the mousing bounding box > unconditionally sets a white rectangle with a black stroke, thus > overridding or hiding the background the user wants. Other way around I think. If you set a background color then normally the plot output begins with a filled rectangle of that color. However if you select "standalone mousing" the program starts the output with a copy of the mousing code and omits the filled background rectangle. > Is this bugworthy, or is there a reason that it has to be this way? According to the code, it was intentional. But quick testing does not show any obvious problem so I am not sure why that was. I will investigate further. > I would really like to be able to render white (and other colours) on > black, as I prefer "inverted" colours - but I also want to be able to use > mousing in my reports. At present, it doesn't look like I can have both. Sure you can. No problem. You can always include a filled background rectangle as a separate command. This should work independent of anything else: set obj 1 rectangle from screen 0,0 to screen 1,1 behind set obj 1 fillstyle solid fillcolor "black" cheers, Ethan > > Thanks, > Daniel |