4

Where are the gnuplot abbreviations specifically documented? For example:- the single letter "l" command. > help l gives a big list and does not identify what the single letter "L" command is expanded to. This question comes from reading posted example scripts & is related to Looking up gnuplot abbreviations which does not clarify how the single letter abbreviations are disambiguated. Many thanks, hope the answer helps others

mjp
  • 61
  • 6

1 Answers1

2

Autoextracted list of gnuplot command abbreviations from source code

       bi - bind 
       ca - call 
       cl - clear 
     eval - evaluate 
       ex - exit 
        f - fit 
        h - help 
       hi - history 
        l - load 
      low - lower 
        p - plot 
       pa - pause 
       pr - print 
 printerr - printerror 
        q - quit 
       ra - raise 
       re - reread 
      ref - refresh 
      rep - replot 
      res - reset 
       sa - save 
      scr - screendump 
       se - set 
       sh - show 
      she - shell 
       sp - splot 
       st - stats 
       sy - system 
      und - undefine 
      uns - unset 
       up - update 

Many thanks to https://superuser.com/users/257269/hastur for the inspiration! I trust this reference is useful.

The exact abbreviation priority may vary with each version of gnuplot. It was extracted from the tarball with the following sh script (or similar).

# Extract file --to-stdout -O
# Specifically select the command table
# Grep commands
# Remove { } syntax, commas & double quotes
# Print abbr & full command
# sort
tar -xv -O -f /opt/local/var/macports/distfiles/gnuplot/5.0.3/gnuplot-5.0.3.tar.gz  gnuplot-5.0.3/src/tables.c | \
  sed -n '/command_ftbl\[\]/,/invalid_command/p'                        | \
  grep '\$'                                                             | \
  sed 's/{//g ; s/}//g ; s/,/ /g ; s/"//g'                              | \
  awk '{split ($1,a, "$"); printf ("%10s - %s \n", a[1],a[1]a[2] ) }'   | \
  sort -bf

The commands are stored in the array command_ftbl[], command options etc are in other tables, but once you know the command, the documentation usually makes the option abbreviations clear.

mjp
  • 61
  • 6