Skip to content

Instantly share code, notes, and snippets.

@adityaiitb
Created August 25, 2021 05:04
Show Gist options
  • Save adityaiitb/9f6083d8069369b0334aed618c5018cc to your computer and use it in GitHub Desktop.
Save adityaiitb/9f6083d8069369b0334aed618c5018cc to your computer and use it in GitHub Desktop.
gnuplot xticlabel
# Data file
# 1 10
# 2 15
# 3 50
# 4 ...
# ....
# Can replace x2ticlabel with xticlabel as well
# When column(1) modulo 8 is zero, use "2^{....}" else ""
set term pngcairo enhanced
plot "a.dat" u 1:2:x2ticlabel((int($1) % 8) == 0 ? "2^".sprintf("{%d}", ($1)-127) : "")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment