Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

No dashed lines although terminal set to dashed

4,198 views
Skip to first unread message

florian...@googlemail.com

unread,
Feb 19, 2015, 6:24:17 PM2/19/15
to
Dear all,

I have the following problem: Even if I set the terminal option 'dashed', my terminal still produces only solid lines, apart from style 0. I use the following code:

set encoding utf8
set terminal pdfcairo dashed enhanced
set termoption dashed
set output 'test.pdf'
test

This behaviour seems to occur only on Windows machines, as the exact same code produces the proper line types on an Apple machine. I need a PDF output, so the code above would be the most convenient.
Is there anything I can do to make my Windows-GnuPlot plot dashed/dotted lines?

Thank you in advance!


P.S.: I'm using gnuplot 5.0 patchlevel 0.

Ethan A Merritt

unread,
Feb 20, 2015, 12:44:46 AM2/20/15
to
florian...@googlemail.com wrote:

> Dear all,
>
> I have the following problem: Even if I set the terminal option
> 'dashed', my terminal still produces only solid lines, apart from
> style 0.

The treated of line properties (color, dash/dot) is very different
in version 5. There is no longer any need for the terminal option
"set term ... dashed" because dashed lines are always possible.

Both the Release Notes and the User Manual for version 5 explain
how dashed lines now work.

http://gnuplot.sourceforge.net/ReleaseNotes_5_0.html

Here is a very brief summary from the Release Notes:

%%%%%
Earlier versions of gnuplot used the keyword "linetype" to mean both
the color and the solid/dot/dash pattern of a line. Version 5 has
separate keywords "linecolor" and "dashtype". You can use these keywords
directly in a plot command or assign any desired color and a dash pattern
to a linetype. You do not need to change the current terminal or
terminal mode in order to use dashed lines.
%%%%%

The following command assigns different dash patterns to linetypes
1 through 4. It does not affect the color of the linetypes.

set for [i=1:4] linetype i dashtype i

To return the linetype properties to their original state

set for [i=1:4] linetype i dashtype solid

There are other options for setting or defining dash patterns,
but that should get you started

Ethan

florian...@googlemail.com

unread,
Feb 20, 2015, 6:29:37 AM2/20/15
to
Thank you so much! Problem is solved by this.
0 new messages