From: Ethan M. <merritt@u.washington.edu> - 2008-10-23 23:52:00
|
On Thursday 23 October 2008 16:31:01 Allin Cottrell wrote: > On Thu, 23 Oct 2008, Ethan Merritt wrote: > > > On Thursday 23 October 2008 12:30:21 Allin Cottrell wrote: > > > It seems to me that a nice solution would be if "set style line" > > > were extended to include a "dashtype/dt" option, in the same way > > > that pointtype can be selected independently of other features of > > > the line. > > > > Isn't that what it does now? > > Each line type has an explicit dash pattern, selected by saying "lt N", > > analogous to selecting point type by saying "pt N". > > Yes, but this depends on the terminal type, making it more or less > impossible to produce a "portable" gnuplot command file which will > produce similar effects (modulo inevitable differences in > capabilities) across the various terminals. Ah, I misunderstood. That's an entirely different issue. We made a concerted effort for 4.2 to bring the sequence of point types into conformity across terminals. So far as I recall, no one argued for doing the same to dash patterns. I have no objections to someone offering a series of patches that re-orders the sequence of dash patterns to achieve some level of cross-terminal agreement. I don't particularly like the sequence used by postscript, but I guess it is the most likely terminal for which we would have to worry about compatibility with existing scripts. Perhaps a more interesting question is how many of the terminals could support user-defined dash patterns? set style dash 1 2,4,2,4 # short-dashes set style dash 2 8,4,1,4 # long-dash, dot plot sin(x) lc rgb "blue" dashstyle 2, ... > I'm particularly interested in eps, pdf(cairo), png(cairo) and emf > (on behalf of Windows users). To get any dashes you have to set > the "dashed" option for these terminals (except for postscript, > which as I noted is exceptional in doing dashes by default). But > the "linetype" numbers in dashed mode produce different effects > as noted below: > > In postscript, dashed mode: > > solid lines: 1, 10, 19, 28 > regular dash: 2, 11, 20, 29 > short dash: 3, 12, 21, 30 > > in pngcairo, pdfcairo, dashed mode: > > solid lines: 1, 6, 11, 16, 21 > regular dash: 2, 7, 12, 17, 22 > short dash: 3, 8, 13, 18 > > in emf, dashed mode: > > solid lines: 1 to 15 > regular dash: 16 to 30 > short dash: 31 to 33 > > This is a total nightmare with regard to portability. > > Allin Cottrell > -- Ethan A Merritt |