summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfpi2022-05-13 10:07:08 +0200
committerfpi2022-05-13 10:08:26 +0200
commit90fb90a51bde5aee02a70dca439d7c69b5e9c382 (patch)
tree3100a4b6fe4c399a8254c94b22c8fc7f0f720403
parentAdd script to interactively place rotated labels (diff)
Add support function for x/y tic formatgnuplot
-rw-r--r--gnuplot.org7
1 files changed, 6 insertions, 1 deletions
diff --git a/gnuplot.org b/gnuplot.org
index be820a4..a9ec9f4 100644
--- a/gnuplot.org
+++ b/gnuplot.org
@@ -1,5 +1,5 @@
# -*- coding: utf-8-unix -*-
-#+PROPERTY: header-args:gnuplot :tangle tangle/.gnuplot :eval query
+#+PROPERTY: header-args:gnuplot :tangle tangle/.gnuplot :eval query :tangle-mode (identity #o444)
* Symlink
First create a symlink to the desired config location.
#+begin_src shell :results silent :tangle tangle/symlink.sh :shebang "#!/bin/bash"
@@ -100,6 +100,11 @@ gbt(col)=sprintf("set tics nomirror; set border 3 back lc '%s'; set grid back lw
gbt="set tics nomirror; set border 3 back lc 'gray50'; set grid back lw 1 lc 'gray50'"
@gbt
#+end_src
+
+Support function to set x/y tic formatting with ~set format x formatter(".0","m")~.
+#+begin_src gnuplot
+formatter(prec,unit)=sprintf("%%%ss %%c%s", prec, unit)
+#+end_src
* A4 plots
See [[https://milianw.de/blog/how-to-generate-proper-din-a4-sized-plots-with-gnuplot.html][How to generate proper DIN A4 sized plots with Gnuplot - Milian Wolff]].