Menu

#1600 dashed lines narrower than solid lines in epslatex terminal

None
closed-duplicate
nobody
None
2015-10-23
2015-04-20
No

When using the epslatex terminal, dashed lines are seemingly plotted half as wide as solid lines.

I have included input (.gpi) and output (.tex,*.eps) of a minimum working example. In my MWE, I expected both lines to be plotted at the same specified width of 10, but the lines are being plotted at two different widths.

For reference, I am using gnuplot 5.0 patchlevel 0 installed using homebrew on Mac OS X 10.10.3.

3 Attachments

Discussion

  • Ethan Merritt

    Ethan Merritt - 2015-04-24

    I suspect the true issue is a bit different.
    The default border linetype in the PostScript terminals (BL in the PostScript header code, "lt -1" from the command line) is twice as thick as the defined linetypes. So far as I know this was originally done on purpose, but the result is a little different between version 4 and version 5.

    In version 4, lt 1, lt 2, lt 3, etc with or without dash patterns were based off the single width definitions LT1 LT2 LT3 ...

    In version 5, solid lines lt 1, lt 2, etc differ in color but they all inherit the double-width BL definition because they are "solid". Dashed lines are built on top of LT1 LT2 LT3 etc...

    I probably muddied things rather than clarifying.

    Anyhow....
    Changing the definition of BL in the PostScript prologue.ps file will remove the double-width distinction, at the cost of making the border of all your version 5 plots look thinner than the border of the same plot in version 4.

    Like this:

    --- old/term/PostScript/prologue.ps 2015-04-23 17:05:52.000000000 -0700
    +++ new/term/PostScript/prologue.ps 2015-04-23 17:05:47.000000000 -0700
    @@ -76,7 +76,7 @@
       /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def
     /DL {Color {setrgbcolor Solid {pop []} if 0 setdash}
      {pop pop pop 0 setgray Solid {pop []} if 0 setdash} ifelse} def
    -/BL {stroke userlinewidth 2 mul setlinewidth
    +/BL {stroke userlinewidth 1 mul setlinewidth
             Rounded {1 setlinejoin 1 setlinecap} if} def
     /AL {stroke userlinewidth 2 div setlinewidth
             Rounded {1 setlinejoin 1 setlinecap} if} def
    

    You can make this change in a particular PostScript output file, or in the file prologue.ps installed system-wide, or to a private copy of prologue.ps. See "help postscript prologue" for how to set up a private copy.

     
  • Ethan Merritt

    Ethan Merritt - 2015-10-23
    • status: open --> closed-duplicate
    • Group: -->
    • Priority: -->
     
  • Ethan Merritt

    Ethan Merritt - 2015-10-23

    See Bug #1689

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.