From: Harald H. <h.h...@tu...> - 2005-02-05 20:24:08
|
On Sat, 5 Feb 2005, Ethan Merritt wrote: > On Saturday 05 February 2005 09:09 am, Ethan Merritt wrote: > > Unfortunately you cannot currently set a line style to have a > > different dot/dash pattern than it has by default, but for a totally > > unintended feature that's not such a severe limitation. > > Assuming that we would like to clean this up and document it properly, > there are a few things that should be decided. > > - The current (unintended) mechanism only works with line styles, > not with in-line specifications like "plot <foo> lt <bar>". > Is that sufficient? I think not. Maybe it would be worth to seperate choosing the dashtype and the color (for example using 'dashtype' as suggested by you and 'color'). Linetype could then be preserved as it is for compatibility reasons. > - The obvious extension is to add a keyword "{dt|dashtype} <n>". > In the context of setting a line style, the command would be > set style line <tag> dt <N> lt rgb "#aabbcc" > This would be exactly equivalent to the current behaviour of > set style line <N> lt rgb "#aabbcc" > except that you could have (<tag> != <N>) I think this is the best approach. But I would prefer to use the keyword 'colour' or 'color' for the colour. E.g.: Set dashtype to <N> and color to RGB value of aa, bb, cc: set style line <tag> dashtype <N> color rgb "#aabbcc" Set dashtype to <N> and color to the <M>th color in automatic color order: set style line <tag> dashtype <N> color <M> Set dashtype to <N> and color to named color: set style line <tag> dashtype <N> color named "name" Set dashtype to <N> and color to CMYK value of aa, bb, cc, dd: set style line <tag> dashtype <N> color cmyk "#aabbccdd" Set dashtype to <N> and color to the <N>th color in automatic color order: set style line <tag> dashtype <N> color <M> set style line <tag> linetype <N> I think the keyword 'colour' is more clear because it tells what it changes. And at the moment, linetype changes both color and dashtype in many cases which should be preserved for compatibility. Escpecially for postscript there is a difference between cmyk and rgb (and hsb) colours depending on the output device. Of course, for pixel terminals the colours have to be converted into the output colour model. > - A surprising number of terminal types already support dashed lines: > apollo be cgm dxf eepic emf epslatex fig gnugraph gpic gpr > hpgl iris4d metafont metapost next openstep post pslatex > pstricks tgif tpic unixplot win x11 > But I suspect that other than the ones piggybacking on post.trm > they all disagree about specific dot/dash patterns. > Is this worth addressing? Yes, I think, all terminals should be harmonized. > - Another alternative is to create a small number of new linetypes. > I suppose these would internally be LT_DOTTED, LT_DASHED, > LT_DOTDASH, ..., and have negative index values (similar to -1 > for the current LT_BORDER line type). I don't really like this idea. In my opinion, the other approach is more flexible and makes future work easier. Indeed it looks like more work for the moment. Regards Harald -- Harald Harders h.h...@tu... http://www.harald-harders.de |