|
From: Tait <gnu...@t4...> - 2014-03-11 08:27:37
|
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"? Keywords like "dashed" and "dot-dash" seem too limiting if we want to support user-defined dash types. But predefined dash types are much easier to implement. For the user-specified "set dashtype", the user-given pattern is implicitly assumed to loop around itself? set dashtype 1 "--- " would end up drawing "--- --- --- --- " etc.? 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 ----" 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. 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? |