gnuplot png output doesn't plot dashed/dotted lines

前端 未结 2 1984
失恋的感觉
失恋的感觉 2020-12-31 05:11

I\'m trying to plot a figure that contains both dashed and continuous lines with gnuplot v4.4 . The code is:

set term postscript eps enhanced color
set style         


        
相关标签:
2条回答
  • 2020-12-31 05:59

    It turns out that I can't seem to get dashed lines in the png terminal either (the one with the GD backend). However, if you have the cairo terminals, you can get a png with dashed lines (assuming you pick the appropriate linetypes).

    set term pngcairo dashed
    set output "foo.png"
    test
    !display foo.png
    !rm foo.png
    

    As an aside, test is fantastic for inquiring what the behavior of a particular terminal will be.

    0 讨论(0)
  • 2020-12-31 06:04

    You have the dt option for dashtype in pngcairo. Legend here:

    e.g

    set style line 5 linetype 3 dt 5 lw 3 linecolor rgb 'green' 
    

    gives dashtype 5

    0 讨论(0)
提交回复
热议问题