|
From: sfeam <sf...@us...> - 2014-03-11 14:56:25
|
On Tuesday, 11 March 2014 08:27:29 AM Tait wrote: > sfeam said (on 2014/03/10): > > On Sunday, 09 March 2014 11:49:09 PM Juhász Péter wrote: > > > ... > > > So there would be a new line property "dashtype" or "dt", allowed > > > everywhere a line specification is accepted. > > > ... > > > So e.g. "plot for [i=0:10] i*x" would do exactly the same as before. > > > But "plot for [i=0:10] i*x" dashtype 1 would keep the line pattern the > > > same for all plotted lines while still cycling the color ... > > > > > Sort of. I think I would typically define all the linetypes to default > > to solid, which I suppose is dt 0. > > > > > Here we hit a snag: what do the numeric dashtypes exactly mean? > > > ... > > > One final question: what about user-specified patterns? Are they needed > > > at all? If yes, what would be the preferred syntax? > > > Should there be a separate "set dashtype" command where the user could > > > set explicit dash and space lengths? This would offer the most > > > flexibility, but it would be hard to implement it across all terminals. > > > > See above. I think we are in agreement. > > > > > Or should there be separate keywords, like "solid", "dashed", "dot-dash" > > > etc? > > > > I don't like that in the general case, but I suppose it might be > > useful to accept "solid" as a synonym for "dt 1" ... > > Do you mean synonym for "dt 0"? Whichever. Currently "linetype 0" is the dotted one. It would be kind of weird if the first and possibly only line in a plot is anything other than solid, but the sequence starts at lt=1. > I assume that each character space in the dashtype string maps to a > minimal-length chunk of line? So '-' is a bit of solid line, and ' ' is > presumably nothing drawn, and '=' would be a double-line. I'm not sure > what '.' is expected to produce? A dot, but raised to centerline, like > '·'? > > I thought about inserting other glyphs, e.g. '»'. Or normal letters, > e.g. > set dashtype 2 "----- A --" > set dashtype 3 "--- B ----" This is already possible in version 4.6 using a combination of "pointinterval" and "with labels". This doesn't involve dashtype that I can see, although one could imagine providing a shortcut that accomplishes the same result with a single command rather than two separate commands. > But then one has to deal with fonts, sizes, weights, rotation, offset, > etc. Maybe it is better to accomplish that sort of idea with just "set > dashtype 2 "----- --" and then follow with a second line "with labels" > to fill in the glyphs. But now the user has to try and synchronize the > "set samples" and/or "every" so that the letters all fall into the gaps > in the dashes. That is what the existing "pointinterval" property is for. > What do linewidth and pointsize mean to a dotted/dashed line? Does a > line with dashtype '···········' ignore pointsize and increasing > linewidth just adds to the vertical height of each dot (thus in the > extreme making it look more like '|||||||||||')? Or will linewidth > implicitly also increase the horizontal spacing so '·' -> '•' -> '●' ... > etc. continues to retain its aspect ratio as it grows larger? Currently there is a "dashlength" property that is independent of both "linewidth" and "pointsize". However right now this is a terminal setting rather than a property of the current line or plot. We might want to rethink that. Ethan |