Hello,
I have a feature request regarding my (last?) post about
rounded/mitered corners in functions and I think that it shouldn't be
so difficult to implement.
PostScript and all related terminals (MetaPost, PStricks, all dialects
of LaTeX supported by PostScript features, ...) support different
types of "line caps" and "line joins" (see page 14 on
http://www.math.ubc.ca/~cass/graphics/manual/pdf/ch1.ps).
(butt / round / square) line cap
(mitered / rounded / beveled) line join
The style may depend on what one wants to to, so it cannot be
generally said that one style is more appropriate than the other and
one would line to mix them as well. For example it is nice to have
sharp corners in frames, but it looks horrible to see such corners in
a plot of a wild function: one is merely looking at those artificial
corners then rather than at function values.
"plot with" currently supports many keywords: linetype, linewidth,
linecolor, (pointtype, pointsize, fillstyle, ...), but there is no
support for rounded vs. sharp line joins. Is there any chance to add
this keyword?
It could be then either used as
plot f(x) with lines linejoin 1 linecap 1
or
plot f(x) with lines linejoin round linecap rounded
or
plot f(x) with lines round rounded % not the keywords for such usage
or globally as
set linejoin mitered
set linecap butt
or perhaps even on the style-level (so that one assigns a certaint
type of linejoin to a certain linestyle, say "set linestyle 2 linejoin
rounded", but I don't ask for that).
If two special commands term->linejoin() and term->linecap() would be
added, most drivers could simply ignore it, while those who care could
take it into conideration and produce results of higher quality.
The attached example roughly illustrates the differences (which are
connected to both problems: lack of support of those lines and lack of
proper support for drawing closed paths - the latter is slightly in
progress I hope), you may open the file with both: a text editor and
GhostView.
Thank you,
Mojca
|