|
From: Christoph B. <us...@be...> - 2014-06-02 09:18:16
|
Zitat von sfeam <sf...@us...>: > On Sunday, 01 June 2014 07:34:53 PM Christoph Bersch wrote: > >> I've seen, that different terminals handle the `dashlength` option >> differently: >> >> set termoption dashlength 1 >> plot x dt 2, 2*x dt '.-' >> pause -1 >> >> set termoption dashlength 3 >> replot >> >> `qt`: dashlength affects only the custom dash pattern >> `wxt`: both patterns are stretched >> `post`: only the builtin patterns are affected >> >> This behaviour should be equal for all terminals. > > Good point. I've had a quick look at the Qt-documentation, but I couldn't find an option to change the dash length for the builtin patterns. Another thing I've seen is, that for some terminals the dash pattern length depends on the linewidth, e.g. for the `qt` terminal. For others, like the `wxt` terminal it doesn't. This gives the following problem with the `wxt` terminal: With the default setting of the line cap (square, see http://cairographics.org/samples/set_line_cap/), a thick, dashed line becomes solid: plot x dt 2 lw 10 This gives a solid line for me. Using `set termoption butt` resolves this, but the dashes look strange, being more dots than dashes. So this would be another point, where we should try to have similar behavior across the terminals, or at least try to. > I am also wondering whether the dashtype or linetype itself should > include a dashlength attribute, independent of the terminal setting. > Thus you could say: > > set dashtype 1 ".-.-" dashlength 0.5 > > or > > set linetype 1 dashtype "._._" dashlength 0.5 Yes, that looks like a reasonable option. Christoph |