Code Snippets Gnuplot

Short texts Gnuplot 🧑‍💻 Code snippets Gnuplot ✍️ Reading lists Gnuplot 👀

cp.gnu

# =========== Pendulum is constrained to move in a parabola z=ax^2 ===================== # formatting reset set nokey # To generate output on screen uncomment below line #and comment out ‘set term gif…’ and ‘set output…’ line #set term qt set term gif animate delay 10 size 854,480 set output ‘pendulum.gif’ set xr[-20:20] set yr[-20:20] set […]

cycloid.gnu

reset set term gif animate delay 4 size 854, 480 # You remember, the animation was too fast! ~ _ ~ # So that, we added a delay here. It means a (4*0.01)s gap between every frame(i.e. 1/0.04=25frames/sec) # Size and delay are optional set output ‘cycloid.gif’ set size ratio -1 set nokey set title […]

speedtest-cli.plot

set datafile separator “,” set xdata time set timefmt “%Y-%m-%dT%H:%M:%S” set format x “%H:%M:%S” set ylabel “Speed” set ytics format “%.0s %cMBit/s” nomirror set yrange [0:*] set y2label “Ping” set y2tics format “%.0f ms” nomirror set y2range [0:80] set grid set linetype 1 lc rgb “blue” lw 2 set linetype 2 lc rgb “dark-green” lw […]

Heat Map Chart reflecting percent change in municipal and school tax if Wilkinsburg and Pittsburgh merge

set terminal svg enhanced size 1920,1080 # https://alleghenycountytreasurer.us/real-estate-tax/ # 4.73 mills allegheny_county_property_taxes(x) = x * (4.73/1000) # wilkinsburg_income_taxes(x) = x * 0.01 pittsburgh_income_taxes(x) = x * 0.03 # https://alleghenycountytreasurer.us/real-estate-tax/local-and-school-district-tax-millage/ wilkinsburg_borough_property_taxes(x) = x * (14.00/1000) wilkinsburg_school_property_taxes(x) = x * (29.5/1000) wilkinsburg_total_property_taxes(x) = wilkinsburg_borough_property_taxes(x) + wilkinsburg_school_property_taxes(x) pittsburgh_borough_property_taxes(x) = x * (8.06/1000) pittsburgh_school_property_taxes(x) = x * (9.95/1000) pittsburgh_total_property_taxes(x) […]

GNUplot example script

set terminal pngcairo transparent enhanced font “arial,10” fontscale 1.0 size 600, 400 set output ‘image.png’ set key outside right top vertical Right noreverse enhanced autotitle nobox set title “plot with filledcurve [options]” set xrange [ * : * ] noreverse writeback set x2range [ * : * ] noreverse writeback set yrange [ * : […]