|
From: sfeam <sf...@us...> - 2014-04-29 03:16:40
|
On Monday, 28 April 2014 02:34:01 PM Ethan A Merritt wrote: > On Monday, 28 April, 2014 14:10:59 Dima Kogan wrote: > > Ethan A Merritt <sf...@us...> writes: > > > > > On Monday, 28 April, 2014 13:30:18 Dima Kogan wrote: > > >> Hi. > > >> > > >> The default line width appears to have been affected in a recent commit: > > >> > > >> https://github.com/gnuplot/gnuplot/commit/b6c8dbfc63387be9e0c84d0d7b9ba6f480e5da8b > > >> > > >> The commit notes don't say anything about it, so I'm wondering if this > > >> change wasn't intentional. Is nobody else seeing this? > > > > > > Do you mean lines in the "test" command? Which terminal? > > > > I just ran a few more tests. Only the x11 terminal appears to be > > affected. This explains why nobody complained yet. To reproduce, plot > > anything 'with lines' in x11. Or "plot x". Here is what is going on. 1) For a long time gnuplot has used the special linetype -1 to indicate a solid black line. This has been a convenient way to guarantee getting a black line even if the normal terminal color sequence does not include black. Most places in the code refer to this linetype as LT_BLACK. 2) Since lt -1 was also guaranteed to be a solid line whatever the terminal dash pattern sequence, it seemed logical to also special case this linetype as LT_SOLID for the purpose of supporting dashtypes. So far so good. 3) The glitch is that some of the oldest gnuplot terminals apparently treat lt -1 as a solid black _double thickness_ line. This is true at least for x11 and postscript. I have not yet checked all the others. So in revising the code to support dashtypes, all the solid lines started being drawn with LT_SOLID, which for x11 and postscript is for some reason drawn double thickness. I see two possible fixes. 1) Change LT_SOLID to some other value. The obvious value would be linetype 1. But this would mean you can never set a non-solid dashpattern for linetype 1, so I don't like this idea. 2) Change x11 so that lt -1 is not drawn double thickness by default. I don't see a problem there. What about postscript? The postscript code really does treat this linetype differently, so there might be side effects from changing it even aside from all those old postscript generating gnuplot scripts out there that were written when lt -1 produced a thicker line. On the other hand, unlike the x11 case the factor of two in the default lt -1 linewidth does not affect any other linetypes or linewidths. So we could just leave it I'm leaning toward fix #2, either with or without making a change to postscript also. Ethan |