From: Ethan A M. <me...@uw...> - 2020-05-01 23:52:16
|
On Friday, 1 May 2020 15:38:15 PDT Ethan A Merritt wrote: > On Friday, 1 May 2020 14:04:22 PDT Dima Kogan wrote: > > Hi. The docs (help fillstyle) say that the default fillstyle is "empty". > > But this isn't what's happening: > > > > set grid > > set object rectangle from 0,0 to 1,1 > > plot [-1:2][-1:2] x > > > > Note that the grid lines do not show up behind the rectangle. If I > > explicitly add "fillstyle empty" to the rectangle definition, you get > > the transparent rectangle. > > Going way back to the initial implementation of rectangle as objects, > the default was "solid fill with background color", which is not the > same thing as "empty". This is true for all object types. > > gnuplot> help set style rectangle > Rectangles defined with the `set object` command can have individual styles. > However, if the object is not assigned a private style then it inherits a > default that is taken from the `set style rectangle` command. > [snip] > The default values correspond to solid fill with the background color and a > black border. > > The idea was to have separate global fill styles for each object type. > In retrospect that might not have been the best idea, but that's what we have. > In retrospect it might also have been better to have all global fill styles > start with the same default. > > What do you think? > Is it worth breaking backward compatibility to change this? > I'm inclined to say yes, but only in the development verion, not for 5.4. > Do away with separate fillstyles? > Keep them but give them all the same default properties? After some thought, I'm coming around to thinking that if we do change it, 5.4 would be a good time. It could be a bullet point in the Release Notes o CHANGE - objects (rectangles, circles, etc) now default to fillstyle "empty" rather than solid fill with background color. Ethanμ |