From 90fb90a51bde5aee02a70dca439d7c69b5e9c382 Mon Sep 17 00:00:00 2001 From: fpi Date: Fri, 13 May 2022 10:07:08 +0200 Subject: Add support function for x/y tic format --- gnuplot.org | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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]]. -- cgit v1.2.3