Menu

pdfcairo term and line aliasing?

Help
gnutron
2016-09-21
2016-09-21
  • gnutron

    gnutron - 2016-09-21

    Below is a script file. Gnuplot makes lines that look bad (not anti-aliased or something?), see attached pdf. Is there a way I could improve upon this? Using version 5.0.4. Thanks!

    reset
    set terminal pdfcairo enhanced font "Garamond,8" fontscale 1.0 size 11in,8.5in 
    set output 'graph.pdf' 
    
    xo=0.846455; #1.125
    r1=7.25;
    r2=9.5;
    r3=12;
    r4=14;
    
    set samples 1000
    set size ratio -1
    set xrange [-xo:xo]
    set yrange [0:0.1]
    set key box at -0.3,-0.3
    set tics out
    set xlabel "Fretboard width (in), graph view is for 43 mm nut"
    set ylabel "Height (in)"
    
    set style line 1 lt 1 dt 1 lw 0.2 lc 'red'  
    set style line 2 lt 1 dt 1 lw 0.2 lc 'blue'
    set style line 3 lt 1 dt 1 lw 0.2 lc 'purple'
    set style line 4 lt 1 dt 1 lw 0.2 lc 'black'
    
    plot\
    -sqrt(r1**2-xo**2)+sqrt(r1**2-x**2) ls 1 t '7.25"',\
    -sqrt(r2**2-xo**2)+sqrt(r2**2-x**2) ls 2 t '9.5"',\
    -sqrt(r3**2-xo**2)+sqrt(r3**2-x**2) ls 3 t '12"',\
    -sqrt(r4**2-xo**2)+sqrt(r4**2-x**2) ls 4 t '14"'
    
    reset
    set term wxt
    set out
    
     

    Last edit: gnutron 2016-09-21
  • Ethan Merritt

    Ethan Merritt - 2016-09-21

    The lines in your graph look perfect when viewed here. I suspect whatever problem you are seeing lies in your pdf viewer rather than the graph.pdf file.

     
  • gnutron

    gnutron - 2016-09-21

    Looks like you're right. If anybody has any ideas about how to make things not look janky on Adobe Acrobat DC or Adobe AcrobatReader DC, let me know. Played with some of the Edit/Preferences/Page Display Rendering options and got nowhere...

     

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.