M_SQRT2=1.41421 ASPECT=1.77777 #set as desired UHD_X=3840 PIX_PER_CM=28.34 xCMs=UHD_X/PIX_PER_CM #set numerator to desired pixel width set terminal pngcairo size (xCMs)cm,(xCMs/ASPECT)cm # Set so that desired ASPECT line is in the middle set yrange [0:UHD_X/ASPECT] # Align graph to boundary set bmargin .05 set rmargin .05 set tmargin .01 set lmargin .01 # Align tic labels inside graph set ytics offset 4,-.4 set xtics offset -1.5,1.3 set key font "sans,10" at 200,460 # Setup the grid set tics scale 0 font "sans,8" set grid lt 1 lw .5 lc rgb "gray" set ytics (240,320,480,640,720,768,800,1080,1200,1440,1536,1600,1800,2160) set xtics (320,480,640,800,854,960,1024,1280,1366,1920,2048,2560,3200,3840) # set output "stdout.png" plot [0:UHD_X] \ x/1.29411 title "letter", \ x/1.33333 title "4:3", \ x/M_SQRT2 title "A4", \ x/1.50000 title "3:2", \ x/1.60000 title "8:5", \ x/1.66666 title "5:3", \ x/1.77777 title "16:9"